The dates in columns D and E are dynamically generated based on the start date in B5.
Conditional formatting is used to shade excluded days in gray and to highlight the final calculated dates in yellow.
All calculations are performed with the WORKDAY function.
WORKDAY can optionally exclude holidays as well as weekends.
The names are for convenience only and make the formulas easier to read.
The result is Thursday, January 2, 2025.
Notice the holidays in the range B11:B13 are valid dates.
The dates are dynamically generated based on the start date withSEQUENCE function.
This works becauseExcel datesare stored as serial numbers.
“Mon”) followed by the date.
The formula returns TRUE and the shading is applied.
The result is that more days are shaded since both weekends and holidays are non-working days.
In column E, the second formula checks for a date equal to the result in cell G6.
The difference is that the conditional formatting is unlinked from column G results and therefore self-contained.