Chapter 6: Conditional formatting with formulas
Exercise 26: Color weekend rows
Task
Fill the Saturday and Sunday rows (columns A–B) of the work schedule with light gray.
Moves 0 (target 1)4 difference(s) from the model
File
Font
Alignment
Number
Styles
Cells
A1Press and release Alt to show KeyTips (Windows). Ctrl + 1 opens Format Cells, Ctrl + Z undoes.
| A | B | C | |
|---|---|---|---|
| 1 | Date | Shift | |
| 2 | 11/2 (Mon) | Work | |
| 3 | 11/3 (Tue) | Work | |
| 4 | 11/4 (Wed) | Work | |
| 5 | 11/5 (Thu) | Work | |
| 6 | 11/6 (Fri) | Work | |
| 7 | 11/7 (Sat) | Off | |
| 8 | 11/8 (Sun) | Off | |
| 9 | 11/9 (Mon) | Work | |
| 10 | ######### | Work | |
| 11 | ######### | Work | |
| 12 | |||
| 13 |
Fill the Saturday and Sunday rows (columns A–B) of the work schedule with light gray.
This drill is for computer screens. On a phone you can review the steps.
- Select A2:B11
- Home > Conditional Formatting > New Rule (Alt → H → L → N)
- Choose "Use a formula to determine which cells to format"
- Enter =WEEKDAY($A2,2)>5, click Format, choose light gray, and click OK
Key takeaway
The 2 in WEEKDAY counts Monday = 1 through Sunday = 7, so values above 5 are weekends.
See conditional formatting for details.