Formatting Issues

Fix Excel Conditional Formatting for Today’s Expiration Date

Anum MushtaqAnum Mushtaq Nov 18, 2026 869 views

Question details

Set expiration-date colors so blank cells are yellow, dates today or earlier are red, and future dates are green.

Fix Excel Conditional Formatting for Today’s Expiration Date
Product
Microsoft Excel
Device & OS
not provided
Scenario
The user applies multiple conditional-formatting rules to a range of expiration dates.
Observed behavior
The red rule does not produce the expected result for today’s date, while overlapping rules and blank-cell comparisons can cause incorrect colors.
Before you start

Identify the expiration-date range and its top-left cell; the examples below use E2:E100, starting at E2. Confirm that entered dates are real Excel dates rather than text.

Solution 1Recommended

Create non-overlapping formula rules for expiration dates

Use formulas that separate blank cells, dates today or earlier, and future dates.

1
Select the date range

Select E2:E100, or select your own expiration-date range and use its top-left cell in the formulas below.

2
Add the yellow blank rule

Go to Home > Conditional Formatting > New Rule > Use a formula to determine which cells to format. Enter =E2="", choose a yellow fill under Format, and save the rule.

3
Add the red date rule

Create another formula-based rule using =AND(E2<>"",E2<=TODAY()). Choose a red fill and save it.

4
Add the green date rule

Create a third formula-based rule using =AND(E2<>"",E2>TODAY()). Choose a green fill and save it.

5
Check rule order and range

Open Home > Conditional Formatting > Manage Rules. Confirm that each rule applies to the intended range, move the blank rule above the date rules, and enable Stop If True for the blank rule if other rules could also format blank cells. Edit or remove conflicting existing rules.

Create non-overlapping formula rules for expiration dates
Match the first cell: If your selected range starts somewhere other than E2, replace E2 in each formula with that range’s top-left cell. The red rule includes today; the green rule includes only future dates.
WPS Spreadsheets

Color expiration dates in WPS Spreadsheets

Use formula-based conditional formatting in WPS Spreadsheets to distinguish blank, expired, and future expiration dates.

  1. 1. Open the spreadsheet: Open WPS Spreadsheets and select the expiration-date range, such as E2:E100.
  2. 2. Create the blank rule: Go to Home > Conditional Formatting > New Rule, choose the formula-based rule option, enter =E2="", and set a yellow fill.
  3. 3. Create the red rule: Add a formula-based rule with =AND(E2<>"",E2<=TODAY()) and set a red fill.
  4. 4. Create the green rule: Add a formula-based rule with =AND(E2<>"",E2>TODAY()) and set a green fill. Check the rules and their applied range under Conditional Formatting > Manage Rules.
Highlight dates today or earlier in redKeep blank cells yellow and future dates greenOpen and save Microsoft Excel XLSX filesWork with a familiar spreadsheet interface
QA img-9

Frequently Asked Questions

Why is today’s date not turning red in Excel?

The red rule must include equality: use =AND(E2<>"",E2<=TODAY()) for a range starting at E2. In Home > Conditional Formatting > Manage Rules, also check for conflicting rules and an incorrect applied range.

Why can a blank cell receive a date color?

Excel can treat a blank cell as zero in a comparison. Exclude blanks from date rules with E2<>"" and place the yellow blank rule above other rules in Manage Rules.

What does Stop If True do?

In Home > Conditional Formatting > Manage Rules, Stop If True prevents lower-priority rules from being evaluated for a cell when that rule matches. It can keep other rules from changing the formatting of a blank cell.

What if the dates are stored as text?

Text dates may not compare correctly with TODAY(). Check the cells and convert recognizable date text using Data > Text to Columns, then verify the results before applying the rules.