Conditional Formatting to identify Weekends and Holidays

UFGATORS

Board Regular
Joined
Nov 28, 2008
Messages
136
Office Version
  1. 365
Hello, I'm looking for a formula to color cells based on weekends and holidays. In cells L2:AP2 are the days of the month. Using the conditional formatting rules I used the following formula "=WEEKDAY(L$2:AP$2,2)>5" to determine the cells to be formatted. In addition to weekends I would like to have holidays formatted too. I have a (holiday) named range in cells B991:B1080. I would assume this range could be combined with the current formula I just can't figured it out. Thanks for any assistance someone may provide.
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Hey there - if your conditional formatting isn't working, try this when determining whether the date in your range falls on a weekend.

Plug this formula into your CF: "Format values where the formula is true:"
=WEEKDAY(L2,2)>5

Make sure that the under the Applies to area, you reference the range in absolute values: =$L$2:$AP$2

You'll then need to create a second CF Rule that evaluates whether one of the dates in your range matches a date value found in your holiday range: =MATCH(L2,Sheet2!$B$991:$B$1080,0). Again, this applies to: =$L$2:$AP$2
 
Upvote 0
Glad it helped you. Please be so kind as to click on the "Like this post" button above.
 
Upvote 0

Forum statistics

Threads
1,214,587
Messages
6,120,406
Members
448,958
Latest member
Hat4Life

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top