Forum Discussion
Help with spreadsheet formula
Hoping I can get some help on the following:
I'm currently building out a model where I'm trying to pair the consumption of food and drink by expiry date and map out optimal consumption over time (which in this case optimal would = consuming as close to the expiry date as possible, but not over).
For every food item that's consumed, two drinks also get consumed.
What I want to be able to do is link the drinks ("SET2" in the image) with the food items ("SET1") so that every time a food item is consumed as indicated in D:H, column C11:C20 is populated, matched to the next two drinks up for their expiry date. D11:H20 illustrates how I imagine I'll populate the rest of the sheet for SET2 based on the information in column C.
One issue to consider is that there are years in which the drinks in SET2 expire prior to the next food item from SET1 coming up for expiry -- in which case the drinks would need to be the driver for when the set would need to be consumed.
Having a hard time thinking of a good way to go about this.. Any help would be much appreciated re: a formula for column C or how to go about approaching this problem.