SOLVED

Varying Holiday Observation Date based on DOW of another holiday formula help.

Copper Contributor

Hello,

 

The attached spreadsheet has a Holiday tab on it and i'm trying to figure out the formula needed to make it work, to where as the new contract completion date on Roadway Zone 3 tab can not be equal to a date the holiday is observed.

 

It is for a State holiday in Dec. that varies depending on what day Christmas is(12-25--) of every year.

 

The State holiday in Dec. works like this.

 

  •  If Christmas is on Saturday, Christmas will be observed on Friday and the state holiday will be observed on that Thursday before.
  • If Christmas is on Sunday, Christmas will be observed on Monday and the state holiday will be on the following Tuesday.
  • If Christmas is on Monday, the state holiday will be on Tuesday.
  • If Christmas is on Tuesday, the state holiday will be on Monday.
  • If Christmas is on Wednesday, the state holiday will be on Tuesday.
  • If Christmas is on Thursday, the state holiday will be on Friday.

For example: in 2021 Christmas is on Saturday which will be observed on Friday, therefore the state holiday will be observed on Thursday.

3 Replies
best response confirmed by drt_80 (Copper Contributor)
Solution

@drt_80 , perhaps

=E13+CHOOSE(WEEKDAY(E13,2),1,-1,-1,1,-1,-2,2)

That was it!!  Thank you so much. You all are GREAT!@Sergei Baklan 

1 best response

Accepted Solutions
best response confirmed by drt_80 (Copper Contributor)
Solution

@drt_80 , perhaps

=E13+CHOOSE(WEEKDAY(E13,2),1,-1,-1,1,-1,-2,2)

View solution in original post