Forum Discussion
Rusty_Tusty
Dec 30, 2023Copper Contributor
Conditional Formatting Non-work Days
Hello, I'm currently building a new calendar for my company. Basically, we have 3 different shifts that each have their own work days/non work days. Below is the brake down for each shift and thei...
- Dec 30, 2023
Hi Rusty_Tusty
For this kind of things it's better to share an actual (anonymized) workbook as we have no idea (except dates in G1,H1...) what your setup is. With the below example:
Cond. Format. rule that applies to =$G$2:$R$6:
=SWITCH($A2, "A",WEEKDAY(G$1,2)>5, "B",WEEKDAY(G$1,1)>4, "C",WEEKDAY(G$1,13)>4)
Corresponding sample attached...
Rusty_Tusty
Jan 07, 2024Copper Contributor
Thank you for the quick response. I do apologize for initial lack of information, but your answer was what I was looking for and I learned something new. I never knew there was a "Switch" formula. Again, thanks a million.
Lorenzo
Jan 07, 2024Silver Contributor
Glad you have it working as expected & Thanks for providing feedback
FYI the https://support.microsoft.com/en-us/office/switch-function-47ab33c0-28ce-4530-8a45-d532ec4aa25e is available with Excel >/= 2019