evenly distribute numbers across a range

  • Thread starter Thread starter hotellending
  • Start date Start date
H

hotellending

I'm trying to create a formula or script that will accomplish the
following

Lets say I'm going to sell 7 apples over the next 12 months
I'm trying to create a script that will evenly distribute the 7 apple
sales across the 12 months
I cannot sell part of an apple so the numbers must be zero or one(this
is what has me jammed up)
The script will allow for more than one apple to be sold in a month if
I were to reduce the months from 12 to 6.
I would like a way to 'weight' the distribution having more sales
occur at the beginning or the end of the time frame.

Any suggestions would be greatly appreciated!!
 
Assuming A1 contains the number of apples, and B1 contains the number of
months, does this formula placed in any row of Column A and copied across
(even past the number of months specified in B1) do what you want?

=IF(COLUMN(A1)<=$B$1,INT($A$1/$B$1)+(COLUMN(A1)<=MOD($A$1,$B$1)),"")
 
Back
Top