Conditional formatting holidays on a calendar from a list

JLawrenc

New Member
Joined
Sep 19, 2013
Messages
5
I have a calendar setup month to month on one sheet. So like C5 is 1-1-13 and D5 is 1-2-13 then B6 starts the next week (Sorry I couldn't get the table insert to work for me here). I also have the display only show the day of the month. Then on sheet 2 I have a list of holiday dates, is there a way I can have a vlookup in sheet 1 and if a date matches on sheet 2 it has a different background?
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Yes you can use conditional formatting and use a formula.

If you name your holiday date range as Holidays this will be easier.

Then the conditional formatting formula (assuming you are putting the conditional formatting on A1) would be
=COUNTIF(Holidays,A1)>0
note the lack of $

Once you've done 1 cell you can copy and paste special formatting to the rest.
 
Upvote 0
Thanks, I do have my holiday range named holidays, if I do =COUNTIF(Holidays,A1)>0 would I have to do that for each of the 365 cells or, I've named all my days as days can I do something like =COUNTIF(Holidays,days)>0. I ask because I also will be adding a vacation function. So if I decided to take next Wednesday off I can just add the date to the vaca list and the calendar will be updated.
 
Upvote 0
Just do it on a1 or whatever the first cell you want to do this on and make sure to change the reference then copy and paste formatting to the rest of the cells. If you compare all the days it will highlight all the cells. You can do another conditional format for the vacation list.
 
Upvote 0

Forum statistics

Threads
1,215,694
Messages
6,126,252
Members
449,305
Latest member
Dalyb2

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