View Single Post
  #5   Report Post  
Old December 23rd 08, 03:22 PM posted to microsoft.public.excel.worksheet.functions
Glenn Glenn is offline
external usenet poster
First recorded activity by ExcelBanter: Jun 2008
Posts: 1,240
Default evenly distribute numbers across a range

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

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!!

A1 = 7 (for Apples)
A2 = 12 (for Months)

B1 = ROUND(ROW()/$A$2*$A$1,0)
B2 = IF(ROW()<=$A$2,ROUND(ROW()/$A$2*$A$1,0)-SUM(B$1:B1),"")

Copy B2 down as needed.