Macro Programming Syntax
This should be a simple fix.
It sounds like you should be able to add four nested IF statements to
account for each of the four quarter possibilities... this would be a
megaformula... not usually a good option. But if you are feeling
ambitious then try...
=IF(N3=1,(IF($B5=0,0,SUM('Weekly Forecast'!O5:OFFSET('Weekly
Forecast'!O5,0,SUM!$B5-1)))),(IF(N3=2,(IF($E5=0,0,SUM('Weekly
Forecast'!O5:OFFSET('Weekly
Forecast'!O5,0,SUM!$B5-1)))),(IF(N3=3,(IF($H5=0,0,SUM('Weekly
Forecast'!O5:OFFSET('Weekly
Forecast'!O5,0,SUM!$B5-1)))),(IF(N3=4,(IF($K5=0,0,SUM('Weekly
Forecast'!O5:OFFSET('Weekly
Forecast'!O5,0,SUM!$B5-1)))),XXX)))))))
I wrote this freehand so it may need to be reformatted, but this should
get you started.
Feel free to drop me a line should you need more help!
|