Hello,
I have a worksheet for demand planning and forecasting that basically shows:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Stock[/TD]
[TD]Monday Demand[/TD]
[TD]Tuesday Demand[/TD]
[TD]Wed Demand[/TD]
[TD]Thurs Demand[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]4[/TD]
[TD]5[/TD]
[TD]4[/TD]
[TD]3[/TD]
[/TR]
</tbody>[/TABLE]
I need to write a formula that will tell me how many days my stock will last (ie: how many days, after fulfilling that days demand, is the stock >= 0)
The Result I need the formula to return from the above example would be "2". (because Monday's demand + Tuesday's demand <=10, but Monday + Tuesday + Wed > 10, so on Wednesday we would be out of stock or stock would be negative)
I wish it were as simple as countif(b2:e2>a2), but I don't need to know how many cells individually are less than stock, I need to know how many cells it takes to add up to more than stock.
Any help would be greatly appreciated. By the way, I'm working in excel 2010, but it has to remain compatible with excel 97 for other users...
Thanks
I have a worksheet for demand planning and forecasting that basically shows:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Stock[/TD]
[TD]Monday Demand[/TD]
[TD]Tuesday Demand[/TD]
[TD]Wed Demand[/TD]
[TD]Thurs Demand[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]4[/TD]
[TD]5[/TD]
[TD]4[/TD]
[TD]3[/TD]
[/TR]
</tbody>[/TABLE]
I need to write a formula that will tell me how many days my stock will last (ie: how many days, after fulfilling that days demand, is the stock >= 0)
The Result I need the formula to return from the above example would be "2". (because Monday's demand + Tuesday's demand <=10, but Monday + Tuesday + Wed > 10, so on Wednesday we would be out of stock or stock would be negative)
I wish it were as simple as countif(b2:e2>a2), but I don't need to know how many cells individually are less than stock, I need to know how many cells it takes to add up to more than stock.
Any help would be greatly appreciated. By the way, I'm working in excel 2010, but it has to remain compatible with excel 97 for other users...
Thanks