ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Need help in showing future purchases over a period of time and atset intervals (https://www.excelbanter.com/excel-worksheet-functions/243550-need-help-showing-future-purchases-over-period-time-atset-intervals.html)

hejnoid

Need help in showing future purchases over a period of time and atset intervals
 
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?

Ashish Mathur[_2_]

Need help in showing future purchases over a period of time and at set intervals
 
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?



hejnoid

Need help in showing future purchases over a period of time andat set intervals
 
Thanks for the help. You got me headed in the right direction. For
what it's worth I had to change the equation to:

=IF(AND(OR(A2=$I$3, AND(MOD(A2-$I$3,$I$2)=0, A2$I$3-1)), SUM($B$1:B1)<
$I$4), $I$4/$I$5,0)


All times are GMT +1. The time now is 09:30 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com