When constructing project schedules, employee timesheets, shift rosters, or delivery roadmaps in Microsoft Excel, visually distinguishing non-working weekend days from standard business days is essential. Manually shading Saturdays and Sundays with a fill colour is slow and fragile; the moment dates shift or a new month begins, all your manual cell colours become misaligned.
By leveraging Excel’s WEEKDAY function inside a Conditional Formatting rule, you can instruct Excel to identify Saturdays and Sundays dynamically and apply automatic shading across individual date cells or entire columns.
Step 1: Understand the WEEKDAY Function
The WEEKDAY formula takes a date and outputs a number representing its day of the week. Setting its second argument (return_type) to 2 configures Excel to count Monday as 1 through Sunday as 7:
=WEEKDAY(A2, 2) > 5
Under this system, Saturday evaluates to 6 and Sunday evaluates to 7. Any output greater than 5 is guaranteed to be a weekend day.
Step 2: Create the Conditional Formatting Rule
To apply automated weekend shading to your date range:
- Highlight the range of cells containing your chronological dates (for instance, cells
A2:A32). - Navigate to the Home tab on the Excel ribbon.
- Click Conditional Formatting in the Styles group.
- Select New Rule… from the drop-down menu.
- In the Select a Rule Type pane, choose Use a formula to determine which cells to format.
- In the Format values where this formula is true field, enter:
=WEEKDAY(A2, 2) > 5
- Click the Format… button.
- Switch to the Fill tab and select a soft grey, light blue, or pastel accent colour.
- Click OK, then click OK again to save the rule.
Excel will instantly shade every Saturday and Sunday across your selected range. If you change a date value, the highlight recalculates and moves automatically.
Step 3: Highlight Entire Columns in Gantt Charts
If your project tracking dates are laid out horizontally across columns (e.g. Row 1 from B1 to AF1) and you want the weekend shading to extend vertically down the entire worksheet grid:
- Select your entire matrix of planning cells (e.g.
B2:AF50). - Open Conditional Formatting > New Rule > Use a formula.
- Lock the row coordinate using a dollar sign so every row evaluates the header date:
=WEEKDAY(B$1, 2) > 5
- Choose your desired fill colour and confirm.
Excel will project vertical weekend shading bands down every Saturday and Sunday column, creating a pristine project Gantt chart that dynamically updates whenever start dates shift.