Forum Discussion
Excel formula help
- Aug 31, 2018
I think I can do it if two things are true.. first you have a list of holidays, and second that the holidays are single days.. like a bank holiday.
I'm attaching a work book which I think does what you described.
The formula looks something like this:
=IF(COUNTIF($K$4:$K$6,F4-7),IF(WEEKDAY(F4,2)=1,F4-10,F4-8),F4-7)
=IF(COUNTIF($K$4:$K$6,F4-7), *does our new date appear in the list of holidays?
IF(WEEKDAY(F4,2)=1, *yes, so is our date a Monday?
F4-10, *yes its a Monday, so -10days to get to friday
F4-8), *no its not a Monday so -8days to get to the day before the holiday
F4-7) * it wasn't in the holiday list so just -7days
Hope that helps.
I think I can do it if two things are true.. first you have a list of holidays, and second that the holidays are single days.. like a bank holiday.
I'm attaching a work book which I think does what you described.
The formula looks something like this:
=IF(COUNTIF($K$4:$K$6,F4-7),IF(WEEKDAY(F4,2)=1,F4-10,F4-8),F4-7)
=IF(COUNTIF($K$4:$K$6,F4-7), *does our new date appear in the list of holidays?
IF(WEEKDAY(F4,2)=1, *yes, so is our date a Monday?
F4-10, *yes its a Monday, so -10days to get to friday
F4-8), *no its not a Monday so -8days to get to the day before the holiday
F4-7) * it wasn't in the holiday list so just -7days
Hope that helps.
Thank you SO much! This worked perfectly! ☺☺☺☺☺