IronMan1982
New Member
- Joined
- May 8, 2015
- Messages
- 20
I'm trying to put together a formula that will shift the contents of a cell to the left if the day is selected as non business day...basically if something falls on a bank holiday i need the spreadsheet to move the contents to the left to the last normal business day before the bank holiday.
I came up with this...but I don't think it's the best solution (in the highlighted green cell) it works fine for the Friday. But if it fell on Monday I need it to fall back to thursday 30th april. I hope all that makes sense.
VBA isn't my strong suit but I was thinking if it would work better with a colour based IF statement perhaps? so for example if the cell colour is grey move all the contents to the left to the first normal business day before the bank/public holiday.
=IF(N$3="Non-Business",OFFSET(M$3,$E18,1),IF(IFERROR(VLOOKUP(CONCATENATE($H18," ",$I18," ",M$4),'Input Sheet'!$B$3:$E$19,4,0),0)=M$4,1,IF(IFERROR(VLOOKUP(CONCATENATE($H18," ",$I18," ",M$5),'Input Sheet'!$B$3:$E$19,4,0),0)=M$5,1,0)))
thanks in advance for any help.
I came up with this...but I don't think it's the best solution (in the highlighted green cell) it works fine for the Friday. But if it fell on Monday I need it to fall back to thursday 30th april. I hope all that makes sense.
VBA isn't my strong suit but I was thinking if it would work better with a colour based IF statement perhaps? so for example if the cell colour is grey move all the contents to the left to the first normal business day before the bank/public holiday.
=IF(N$3="Non-Business",OFFSET(M$3,$E18,1),IF(IFERROR(VLOOKUP(CONCATENATE($H18," ",$I18," ",M$4),'Input Sheet'!$B$3:$E$19,4,0),0)=M$4,1,IF(IFERROR(VLOOKUP(CONCATENATE($H18," ",$I18," ",M$5),'Input Sheet'!$B$3:$E$19,4,0),0)=M$5,1,0)))
thanks in advance for any help.