Sundance_Kid
Board Regular
- Joined
- Sep 2, 2017
- Messages
- 130
- Office Version
- 365
- Platform
- Windows
Hey,
I am trying to add an if part to a sum & vlookup formula, to lookup up & return a different column depending on whether the date is before a certain date.
Currently my formula is =SUM(O1*VLOOKUP(B1,Sheet1!$D$3:$F$8,3,0)) which is basically multiply the number of days in cell O1 x the relevant amount returned from the cells D3:F8 column 3 on a separate sheet based on cell B1.
Now what I am trying to do, is change the formula to include a date.
So it will be the same formula above but now saying if the date in column M1 is before the 1st February please look up cells D3:G8 & look up column 3 (F) but if the date is after the 1st Dec please look up column 4 (G).
Can anyone advise on the best way to include that please?
Thanks
I am trying to add an if part to a sum & vlookup formula, to lookup up & return a different column depending on whether the date is before a certain date.
Currently my formula is =SUM(O1*VLOOKUP(B1,Sheet1!$D$3:$F$8,3,0)) which is basically multiply the number of days in cell O1 x the relevant amount returned from the cells D3:F8 column 3 on a separate sheet based on cell B1.
Now what I am trying to do, is change the formula to include a date.
So it will be the same formula above but now saying if the date in column M1 is before the 1st February please look up cells D3:G8 & look up column 3 (F) but if the date is after the 1st Dec please look up column 4 (G).
Can anyone advise on the best way to include that please?
Thanks