Formatting Issues

Highlight Dates Exactly Five Days Before Today in Excel

Ayan MasoodAyan Masood Nov 18, 2026 869 views

Question details

Highlight dates that are exactly five days before the current date, without highlighting older dates.

Highlight Dates Exactly Five Days Before Today in Excel
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.
Before you start

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.

Solution 1Recommended

Create a Formula-Based Conditional Formatting Rule in Excel

Use this rule to highlight only the date exactly five days before today.

1
Select the date range

Select the cells containing your dates, such as A2:A100.

2
Create a new rule

Go to Home > Conditional Formatting > New Rule, then choose Use a formula to determine which cells to format.

3
Enter the formula

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.

4
Choose the highlight

Click Format, select a fill color, and click OK. Click OK again to apply the rule.

Create a Formula-Based Conditional Formatting Rule in Excel
The matching date changes: TODAY() recalculates with the current date, so the highlighted date changes as days pass.
WPS Spreadsheet

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. 1. Open your workbook: Open WPS Spreadsheet and use Open to select your Excel workbook.
  2. 2. Select the dates: Select the date cells you want to highlight, such as A2:A100.
  3. 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. 4. Set the highlight: Choose Format, select a fill color, and confirm the rule to apply it to the selected cells.
Highlight the exact five-day-old date as TODAY() recalculatesOpen and edit Microsoft Excel XLSX and XLS filesUse familiar spreadsheet menus and conditional formatting toolsWork with a free, lightweight office suite
microsoft office alternative - wps office

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.