Highlight Past and Current Dates in Excel with Conditional Formatting
Question details
Automatically highlight dates that are today or earlier without formatting blank cells.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A user wants a date range to update its highlighting automatically as the current date changes.
- Observed behavior
- Dates up to and including today should be highlighted, while blank cells remain unformatted.
Identify the date range and its top-left cell; the formula must refer to that cell. Make sure the entries are recognized as dates rather than text.
Create a formula rule that excludes blank dates
Use this rule to highlight dates through today and leave blank cells unformatted.
Select the cells containing your dates, such as B2:B100. Keep B2 as the active cell when creating the rule.
On the Home tab, select Conditional Formatting > New Rule, then choose Use a formula to determine which cells to format.
Enter =AND(B2<>"",B2<=TODAY()). Replace B2 with the top-left cell of your selected range, and leave the reference relative so the rule adjusts for each cell.
Select Format, choose a fill or other formatting, and click OK twice to apply the rule.
Open Home > Conditional Formatting > Manage Rules and check the Applies to range. If another rule overrides the date rule, adjust the rule order or its Stop If True setting.

Highlight Due Dates Automatically in WPS Spreadsheet
Use a formula-based conditional formatting rule in WPS Spreadsheet to highlight dates through today while leaving blank cells unformatted.
- 1. Open the spreadsheet: Open WPS Spreadsheet and use Open to select your Excel workbook.
- 2. Select the dates: Select the date range, such as B2:B100, with B2 as its first cell.
- 3. Add a formula rule: Choose Home > Conditional Formatting > New Rule, select the formula-based rule option, and enter =AND(B2<>"",B2<=TODAY()). Replace B2 with the first cell of your range.
- 4. Apply the format: Choose Format, select a highlight style, and confirm the rule. Save the workbook using File > Save.

Frequently Asked Questions
Why are blank cells being highlighted by my date rule?
A simple Cell Value rule can treat blanks like zero. Create a formula rule under Home > Conditional Formatting > New Rule and use =AND(B2<>"",B2<=TODAY()), adjusting B2 to the first cell in your range.
How do I highlight only dates before today?
In your formula-based conditional formatting rule, use =AND(B2<>"",B2<TODAY()). Replace B2 with the first cell of the selected range.
Why isn't a date with today's date highlighted?
The cell may contain a time after midnight or a date stored as text. For date-and-time values, use =AND(ISNUMBER(B2),B2<TODAY()+1); for text dates, convert them to recognized Excel dates.
Will the highlighting change automatically tomorrow?
Yes. TODAY() uses the current date when the workbook recalculates. If the highlighting does not update, check Formulas > Calculation Options and select Automatic.




