Forum Discussion

JenniL0211's avatar
JenniL0211
Copper Contributor
Aug 31, 2018

Excel formula help

I’m creating a spreadsheet with a number of date calculations. I have all but one set figured out and cannot for the life of me get it to do what I need it to do. I need a formula that will take a dat...
  • Philip West's avatar
    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.

Resources