What I would like to do is choose a date at random, then use VLOOKUP to obtain a value assigned to that date. Once VLOOKUP has established the first value, I then need the next values to follow an assigned sequence. What I'm seeking to do is tie production volumes to a date randomly chosen by me (always month end). The formula I have so far is as follows (see FORMULA. A sample of my sheet is shown below for greater clarity (see SHEET SETUP. My sticking point is how to convince excel to cascade the prescribed values once the first value in the sequence has been established.
FORMULA:
=IF(E$2>$B4,0,IF(E$2=B4,VLOOKUP(1,$R$3:$S$653,2,FALSE), IF(E3=$S$4,VLOOKUP((COUNT(E3:E3))+1,$R$3:$S$653,2,FALSE), VLOOKUP(x,$R$3:$S$653,2,FALSE))))
[pre]
[/pre]
FORMULA:
=IF(E$2>$B4,0,IF(E$2=B4,VLOOKUP(1,$R$3:$S$653,2,FALSE), IF(E3=$S$4,VLOOKUP((COUNT(E3:E3))+1,$R$3:$S$653,2,FALSE), VLOOKUP(x,$R$3:$S$653,2,FALSE))))
[pre]
Code:
SHEET SETUP:
Production Month Random Date Input Month after start list of values
1 0 (before prod'n) 1 value1
2 0 (before prod'n) 2 value2
3 value1 3 value3
4 value2 4 value4