Formatting Issues

Create Excel Conditional Formatting Rules for Dates and TODAY

Jason MillerJason Miller Nov 22, 2026 869 views

Question details

Create conditional formatting rules that color dates according to their distance from today.

Create Excel Conditional Formatting Rules for Dates and TODAY
Product
Microsoft Excel
Device & OS
not provided
Scenario
The user wants separate colors for past dates, dates within three months, and dates more than three months away.
Observed behavior
All cells received the same color when a broad future-date rule overlapped with other rules.
Before you start

Confirm that the cells contain actual Excel dates rather than text, and note the first cell in the range you want to format. The formulas below assume date-only values in L1:L100; adjust L1 to match the first cell in your selection.

Solution 1Recommended

Create three non-overlapping date rules in Excel

Use these rules to assign a different color to each date range without a broad future-date rule overriding the others.

The rules treat today through the date exactly three calendar months from today as the middle category. ISNUMBER excludes blank cells and text.

Use relative references such as L1 so Excel evaluates each cell in the selected range. If your dates include times, remove the time portions first to apply these date-only boundaries.

1
Select the dates

Select L1:L100, or select your own date range and replace L1 in each formula with its first cell.

2
Add the past-date rule

Go to Home > Conditional Formatting > New Rule, select Use a formula to determine which cells to format, and enter =AND(ISNUMBER(L1),L1<TODAY()). Click Format, choose a color, and click OK.

3
Add the three-month rule

Create another formula-based rule with =AND(ISNUMBER(L1),L1>=TODAY(),L1<=EDATE(TODAY(),3)). Choose a different color and click OK.

4
Add the later-date rule

Create a third formula-based rule with =AND(ISNUMBER(L1),L1>EDATE(TODAY(),3)). Choose a third color and click OK.

5
Check the rule ranges

Open Home > Conditional Formatting > Manage Rules. Verify that each rule applies to the intended range, and remove or edit any older broad rule such as =TODAY()<L1 that overlaps the new rules.

Create three non-overlapping date rules in Excel
Formula separators: If Excel rejects a formula because of your regional settings, try semicolons instead of commas between arguments.
Format dates in WPS Spreadsheets

Color date ranges in WPS Spreadsheets

Use formula-based conditional formatting in WPS Spreadsheets to distinguish past dates, dates within three months, and later dates in a worksheet.

  1. 1. Open and select: Open your workbook in WPS Spreadsheets and select the date cells, such as L1:L100.
  2. 2. Create the past-date rule: On the Home tab, open Conditional Formatting > New Rule and choose the formula-based rule option. Enter =AND(ISNUMBER(L1),L1<TODAY()) and choose a fill color.
  3. 3. Create the remaining rules: Add a rule with =AND(ISNUMBER(L1),L1>=TODAY(),L1<=EDATE(TODAY(),3)) and another with =AND(ISNUMBER(L1),L1>EDATE(TODAY(),3)). Choose a different color for each.
  4. 4. Review and save: Use Conditional Formatting > Manage Rules to check the applied range and remove overlapping rules, then use File > Save to save the workbook.
Apply separate colors to date ranges using TODAY and EDATE.Open and save Microsoft Excel XLSX files.Use a familiar spreadsheet interface to manage formatting rules.
microsoft office alternative - wps office

Frequently Asked Questions

Why are all my future dates the same color?

A rule such as =TODAY()<L1 matches every future date, including dates within three months. Open Home > Conditional Formatting > Manage Rules and replace or remove that broad rule.

Does the three-month rule include today?

Yes. The formula using L1>=TODAY() and L1<=EDATE(TODAY(),3) includes today and the date exactly three calendar months from today.

Why is a date not receiving any color?

Check that it is a real date value rather than text and that it falls within the Applies to range in Conditional Formatting > Manage Rules. The ISNUMBER condition excludes text and blank cells.

What should I change if my dates start in another cell?

Replace L1 in each formula with the first cell of your selected range. For example, if the selection starts at B2, use B2 in the formulas and verify the Applies to range in Manage Rules.