Fix Excel Conditional Formatting for Today’s Expiration Date
Question details
Set expiration-date colors so blank cells are yellow, dates today or earlier are red, and future dates are green.

- 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.
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.
Create non-overlapping formula rules for expiration dates
Use formulas that separate blank cells, dates today or earlier, and future dates.
Select E2:E100, or select your own expiration-date range and use its top-left cell in the formulas below.
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.
Create another formula-based rule using =AND(E2<>"",E2<=TODAY()). Choose a red fill and save it.
Create a third formula-based rule using =AND(E2<>"",E2>TODAY()). Choose a green fill and save it.
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.

Color expiration dates in WPS Spreadsheets
Use formula-based conditional formatting in WPS Spreadsheets to distinguish blank, expired, and future expiration dates.
- 1. Open the spreadsheet: Open WPS Spreadsheets and select the expiration-date range, such as E2:E100.
- 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. Create the red rule: Add a formula-based rule with =AND(E2<>"",E2<=TODAY()) and set a red fill.
- 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.

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.




