Hi,
Assume that in A2:A102, you have the month numbers. In I2:I5, you have
bunches, total apples to be purchased, first month of purchase and month
increments.
In cell B2, you may use the following formula and then copy down till B102
=IF(AND(OR(A2=$I$4,MOD(A2,$I$5)=4),SUM(B$1:B1)<$I$ 3),MIN($I$3-SUM(B$1:B1),$I$2),"")
Hope this helps.
--
Regards,
Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com
"hejnoid" wrote in message
...
My problem is lets say I know I want to buy a total of A apples in
equal bunches until I have reached A. However these purchases will be
spread over time. Lets say I have months numbered from 1 to 100 in a
vertical column. I want to first be able to tell the function that I
want to purchase the apples in a certain number of bunches say X.
Then I want to say that my first purchase of apples will be made on
month Y with subsequent purchases made each Z months until I have
purchased a total of A apples. so I would like an output where in
column A I have months listed from 1 to 100 and in column B the number
of apples purchased in that month will be displayed. I anticipate most
months having an output of 0. Any ideas on how to tackle this one?