Okay, take a look at this attachment. The equations are getting longer. In this example, the spreadsheet always starts with Cycle 1 AM. I imagine that's not the case. We could set up a cell with a dropdown (AM/PM) or (Cycle 1/Cycle 2) to adapt for that. Which would you prefer?
Currently, Col B and C are just to play with, they can be deleted once you're happy with results. They show inventory AFTER that cycle.
Col D, D7 is
Formula:
=IF(OR($A$2-ROW(A1)*2<0,$A$3-ROW(A1)<0),"",TEXT($D$2+INT((ROW(A1)-1)/2),"m/dd/yyyy")& IF(MOD(ROW(A1),2)=1, " 6AM", " 2PM"))
E7 is
Formula:
=IF(LEN(D7)>1,IF(RIGHT(D7,3)="6AM","Cycle 1", "Cycle 2"),"")
and F7 is
Formula:
=IF(LEN(D7)>1,IF(OR($A$3-ROW(A1)=5,OR($A$2-2*ROW(A1)={10,11})), "Please Reorder, Supply for 5 cycles left",IF(OR($A$3-ROW(A1)=0,OR($A$2-2*ROW(A1)={0,1})), "Out of Stock after this cycle, Please Refill","")),"")
Note: If your second strength falls within 5 cycles of depletion after the first one but before refill, a second warning will show up. Hope that's okay.
Bookmarks