I want to calculate supply in days depending on future expectations (each month having 30 days). Example:
In this case, the formula should evaluate to 40 days: first month uses 16 units, leaving 16 in stock. The next month uses 48, and the 16 remaining will cover 10 days => 30 + 10 = 40 days.
I can get it to work using a huge formula of nested IF:s, but would be interested to hear if there are more elegant solutions? The nested IF approach also is limited to a maximum of 6 months forward, but I would of course like to have a formula which could use up to one year of predicted use. I also don't want a VBA solution.
Thanks a lot in advance for all ideas!
Code:
Stock (A1): 32
Usage month 1 (A2): 16
Usage month 2 (B2): 48
Usage month 3 (C2): 28
In this case, the formula should evaluate to 40 days: first month uses 16 units, leaving 16 in stock. The next month uses 48, and the 16 remaining will cover 10 days => 30 + 10 = 40 days.
I can get it to work using a huge formula of nested IF:s, but would be interested to hear if there are more elegant solutions? The nested IF approach also is limited to a maximum of 6 months forward, but I would of course like to have a formula which could use up to one year of predicted use. I also don't want a VBA solution.
Thanks a lot in advance for all ideas!