Microsoft Excel – creating a calendar with weekends greyed out

I was demonstrating using the fill handle to create lists of weekdays recently when one of my trainees asked whether we could instead produce a calendar with weekends greyed out.

The answer is to use conditional formatting.

I first of all used the Autofill handle to put the days of the week on the top row and the dates on the second row. In this instance, my first column has times of day in it, though it could have anything needed.

Now, I selected the cell range that I wanted to format in this case A1:AE21.

Then I went to Home tab, Styles group, Conditional Formatting – New Rule. From Select a Rule Type I chose Use a formula to determine which cells to format. In the Format values where this formula is true I typed



Then clicked Format. In this instance I went to the Fill tab and chose a shading colour, then clicked OK twice.

I did similarly for Sunday. Probably if I had thought about it for longer I could have combined the two!


What happens though if we don’t have days of the week in our worksheet, just dates? In this case we would have to use the WEEKDAY function to work out the days of the week first. Sunday is weekday 1 and Sunday is weekday 2.

In this case the formulas are

=WEEKDAY(A$1)=1 and =WEEKDAY(A$1)=7

Find out more about our Microsoft Excel training London, UK or our Microsoft Excel training Dorset, Hampshire, Wiltshire.

Find out more about our Microsoft Excel training Sydney, Australia.

About jdonbavand

I am a trainer of Microsoft Office, Microsoft Project and Crystal Reports. I have called my blog "If Only I'd Known That...." because I hear it so many times in training sessions. In fact, if only I had a £100 (or 150 Aussie dollars)for every time someone says "If only I'd known that." ....
This entry was posted in Microsoft Excel, Microsoft Excel 2010, Microsoft Excel 2013, Microsoft Excel 2016 and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s