Conditional formatting for weekends
Select cells you want to format, for example, daily competition results for two teams:
![Data of daily competition results in Excel for Microsoft 365 Data of daily competition results in Excel 365](/images/tips/521_365/1.png)
To highlight weekends, do the following:
1. On the Home tab, in the Styles group, select the Conditional Formatting drop-down list, and then click New Rule...:
![Conditional Formatting in Excel for Microsoft 365 Conditional Formatting in Excel 365](/images/tips/excel_button365/new_rule.png)
2. In the New Formatting Rule dialog box:
- In the Select a Rule Type list, select the Use a formula to determine which cells
to format:
- In the Edit the Rule Description group:
- In the Format values where this formula is true field enter the formula:
= WEEKDAY (<date range>, 2) > 5:
The formula WEEKDAY returns a number between 1 and 7 that corresponds to a particular day of the week. With return_type = 2: 1 = Monday, 2 = Tuesday, 3 = Wednesday, 4 = Thursday, 5 = Friday, 6 = Saturday and 7 = Sunday.
- Click on the Format... button to select a format for these cells, for example,
add background color:
- In the Format values where this formula is true field enter the formula:
- Click OK:
![Conditional formatting for weekends in Excel for Microsoft 365 Conditional formatting for weekends in Excel 365](/images/tips/521_365/5.png)
You can create several different formulas for the same cells. For example, to highlight Wednesdays in red as control days:
![Edit Formatting Rule for Wednesdays in Excel for Microsoft 365 Edit Formatting Rule for Wednesdays in Excel 365](/images/tips/521_365/6.png)
You will see the highlighted data without calculating weekdays:
![Conditional formatting for weekends and Wednesdays in Excel for Microsoft 365 Conditional formatting for weekends and Wednesdays in Excel 365](/images/tips/521_365/7.png)
See also this tip in French: Mise en forme conditionnelle pour les week-ends.