In the For-loop below the lookup_value in the Vlookup formulas are not updating. That is, the values of Forecast, wForecast and wDemand do not change after subsequent iterations of (i).
I have a msgbox to debug and see what ForecastYear is at the beginning of each iteration of the For-loop. It updates normally from 2016.1 through to 2016.4
Then, I tried copying out the code 4 times, removing the For-Loop completely, and changed the ForecastYear manually in each instance. It works perfectly.
So I can fall back on that, but it still doesn't explain the problem with the vlookups not recognizing the change in the variable.
Thank you for any help on the matter.
Please Login or Register to view this content.
Bookmarks