How to Shade Weekends in Excel: A Step-by-Step Guide
In this article
You can shade weekends in Excel automatically by applying a conditional formatting formula that checks the weekday of each date and fills cells for Saturday and Sunday. The most reliable approach uses a formula based on the WEEKDAY function, applied to the date range you want to format. This works in Excel for Microsoft 365, Excel 2021, 2019, and 2016 on Windows and Mac, and the steps are nearly identical across versions. The result is a calendar or schedule where weekends stand out visually without manual highlighting, and it updates automatically when dates change.
What You'll Need
- Excel 2016 or later (Windows or Mac) or Microsoft 365. The conditional formatting formula approach also works in Excel 2013 and 2010, though menu labels may differ slightly.
- A worksheet with dates entered as real Excel dates (not text). You can check by selecting a cell and looking at the formula bar: a real date appears as a date, not left-aligned text.
- Basic familiarity with selecting ranges and opening the Conditional Formatting menu.
Step-by-Step
- Select the range you want to shade. Click the first cell of your date column or calendar grid, then drag to the last cell. For a full row highlight (shading the entire row for weekend dates), select the entire data range including all columns, for example A2:G100. Do not include header rows unless you want them formatted too.
- Open Conditional Formatting. On the Home tab, click Conditional Formatting in the Styles group. Choose New Rule. (Menu labels can differ slightly by version and region, but this path is consistent in current Excel.)
- Choose the formula option. In the New Formatting Rule dialog, select "Use a formula to determine which cells to format."
- Enter the weekend formula. In the formula box, type
=WEEKDAY(A2,2)>5where A2 is the top-left cell of your selected range. The2tells WEEKDAY to treat Monday as 1 and Sunday as 7, so Saturday (6) and Sunday (7) are greater than 5. If your range starts at a different cell, adjust the reference to match the active cell of your selection. Do not use dollar signs on the row or column unless you specifically want to lock the reference; relative references let the rule apply correctly across the whole range. - Set the fill color. Click Format, go to the Fill tab, choose a light gray or another subtle color, and click OK. A light shade keeps text readable; avoid dark colors that hide the date or content.
- Apply and test. Click OK to close the New Formatting Rule dialog, then OK again in the Conditional Formatting Rules Manager if it appears. Your weekend dates should now be shaded. Change a date to a weekday and confirm the shading disappears; change it back to a Saturday or Sunday and confirm the shading returns.
- For a full-row highlight, adjust the formula reference. If you selected A2:G100 and want the whole row shaded when the date in column A falls on a weekend, use
=WEEKDAY($A2,2)>5. The dollar sign locks the column so every cell in the row checks column A, while the row number stays relative so each row checks its own date. - Copy the formatting to other ranges if needed. Use the Format Painter or repeat the steps for additional date columns. Conditional formatting rules are stored per worksheet, so each sheet needs its own rule.
Common Mistakes
- Dates stored as text. If dates are left-aligned or WEEKDAY returns an error, the cells are likely text. Convert them with Text to Columns (Data tab) or re-enter them as dates.
- Wrong cell reference in the formula. The formula must reference the active cell of your selection, not a fixed cell elsewhere. If you select A2:A100, the formula should start with A2.
- Missing dollar signs for row highlighting. Without
$A2, a full-row rule may check the wrong column and shade inconsistently. - Applying the rule to the wrong range. Conditional formatting only affects the selected cells. If part of your calendar is unshaded, the range likely does not cover it.
- Using a dark fill that hides text. Choose a light color so dates and entries remain legible.
Tips
- Use
=WEEKDAY(A2,2)>5for Saturday and Sunday. To shade only Sunday, use=WEEKDAY(A2,2)=7; for only Saturday, use=WEEKDAY(A2,2)=6. - Combine weekend shading with a second rule for holidays using a list of holiday dates and the COUNTIF function, for example
=COUNTIF($H$2:$H$20,A2)>0. - Keep the fill color subtle so conditional formatting for other conditions (overdue tasks, for example) still stands out.
- Test the rule on a small range first, then expand it once you confirm the shading behaves correctly.
- Remember that conditional formatting does not change the underlying data; it only changes appearance, so sorting and calculations are unaffected.
Troubleshooting
If no shading appears, first check that the range is selected and the rule is enabled in Conditional Formatting > Manage Rules. Confirm the formula references the correct top-left cell. If shading appears in the wrong places, the cell reference is likely off by a row or column; edit the rule and adjust. If WEEKDAY returns #VALUE!, the cell does not contain a valid date. If the shading disappears after copying or pasting, reapply the rule to the new range. If the file was created in another program, dates may be stored as text; convert them before applying the rule. Finally, if the rule works on one sheet but not another, remember each worksheet stores its own conditional formatting rules.
Frequently Asked Questions
Can I shade weekends without conditional formatting?
You can manually fill cells, but the shading will not update when dates change. Conditional formatting is the only automatic method.
Does this work in Excel for Mac?
Yes. The Conditional Formatting menu and formula option are available in Excel for Mac, though dialog layouts may differ slightly.
Can I shade weekends in a calendar layout where dates are in multiple columns?
Yes, but the formula must reference the correct date cell for each column. For a calendar grid, apply a separate rule per column or use a formula that checks the date in each cell's own position.
Will the shading print?
Yes, conditional formatting fills print by default. Check Print Preview to confirm the colors appear as expected.
Can I use this to shade weekdays instead?
Yes. Use =WEEKDAY(A2,2)<6 to shade Monday through Friday.
Does the rule apply to blank cells?
Blank cells are treated as zero by WEEKDAY, which may return an error or unexpected result. To avoid shading blanks, add a check: =AND(A2<>"",WEEKDAY(A2,2)>5).