Highlight Dates Exactly Five Days Before Today in Excel
Question details
Highlight dates that are exactly five days before the current date, without highlighting older dates.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Apply conditional formatting to a range of date cells using a rule that changes with today's date.
- Observed behavior
- Only cells containing the date exactly five days before today should be highlighted.
Identify the first cell in the date range and make sure the entries are actual Excel dates rather than text. Exact equality will not match a date that also contains a nonzero time.
Create a Formula-Based Conditional Formatting Rule in Excel
Use this rule to highlight only the date exactly five days before today.
Select the cells containing your dates, such as A2:A100.
Go to Home > Conditional Formatting > New Rule, then choose Use a formula to determine which cells to format.
Enter =A2=TODAY()-5, replacing A2 with the first cell in your selected range. Leave the reference relative so the rule checks each cell in the range.
Click Format, select a fill color, and click OK. Click OK again to apply the rule.

Use a Cell Value Equals Rule in Excel
Choose this option if you prefer a rule based on cell values instead of a formula that references the first cell.
Highlight the Same Date in WPS Spreadsheet
Use a formula-based conditional formatting rule in WPS Spreadsheet to highlight dates exactly five days before today.
- 1. Open your workbook: Open WPS Spreadsheet and use Open to select your Excel workbook.
- 2. Select the dates: Select the date cells you want to highlight, such as A2:A100.
- 3. Add the rule: Go to Home > Conditional Formatting > New Rule and choose the option to use a formula. Enter =A2=TODAY()-5, replacing A2 with the first cell in your selection.
- 4. Set the highlight: Choose Format, select a fill color, and confirm the rule to apply it to the selected cells.

Frequently Asked Questions
Why are dates older than five days not highlighted?
The formula =A2=TODAY()-5 uses equality, so it matches only the date exactly five days before today. It does not match earlier dates.
Why isn't a date that looks correct being highlighted?
The cell may contain text or a time as well as a date. Check the cell's value and convert text to a date or remove the time if you need an exact date-only match.
Will the highlighted date update automatically?
The TODAY() function updates when the workbook recalculates. If the result appears stale, check the calculation settings under Formulas > Calculation Options and select Automatic.
What cell reference should I use in the formula?
Use the first cell in the selected range. For example, use =B3=TODAY()-5 when the selected range starts at B3.




