Start Free Course

Conditional Formatting For Dates

Written by ExcelMojo Editorial Team ExcelMojo Editorial Team ExcelMojo editorial profile and article credentials. Full Bio
Reviewed by Dheeraj Vaidya, CFA, FRM Dheeraj Vaidya, CFA, FRM Reviewed for accuracy, clarity, and editorial standards. Full Bio
Updated Apr 22, 2026
Read Time 12 min

What Is Conditional Formatting For Dates?

Conditional formatting for dates is an option to format and highlight date values based on the specified conditional formatting rule or criteria.

Users can use the Conditional Formatting feature for dates to highlight overdue dates, expiry dates, specific dates such as weekends, and dates within a specified period.

For example, the table below lists students and their date of birth data.

Frequently Asked Questions (FAQs)

1. How to do conditional formatting in Excel for expiry dates?

We can do conditional formatting in Excel for expiry dates using the Conditional Formatting feature in the Home tab.
For example, the table below lists grocery items and their manufacturing and expiry dates.

FAQ 1

And the requirement is to conditional format the expiry dates to highlight those past 6/20/2023. In other words, we aim to highlight the expiry dates of expired items, considering the date 6/20/2023 as the cut-off date.

1: Select the cell range C2:C8 and choose HomeConditional FormattingNew Rule.

FAQ 1 - Step 1

The New Formatting Rule window will open, where we must select the last rule type.

FAQ 1 - Step 1 - New Rule

2: Enter the date formatting condition in the field inside the Edit the Rule Description section.

=$C2<DATE(2023,6,20)

FAQ 1 - Step 2

And click Format to open the Format Cells window.

3: Select the Fill tab to open it and choose the required background cell color.

FAQ 1 - Step 3

And click OK.

FAQ 1 - Step 3 - Click ok

Finally, once we click OK in the New Formatting Rule window, it will close, and we will obtain the below output.

FAQ 1 - Output

The DATE() accepts three arguments, year, month, and day. And it returns the date 6/20/2023. Next, the formula checks each cell date value in the chosen cell range C2:C8, whether the date is older than the specified cut-off date, 6/20/2023.

So, if a date value’s serial number equivalent is smaller than the cut-off date’s serial number equivalent, the condition holds in the corresponding cell. And it gets highlighted in the specified format.

2. Is Excel conditional formatting dates within 14 days possible?

Excel conditional formatting dates within 14 days is possible using the following formula as the conditional formatting rule in the Conditional Formatting feature in the Home tab:

AND(Date Value>(TODAY()-14))

The formula will highlight cells within the chosen cell range that have a date within 14 days of the current date.

3. Why is my date conditional formatting not working?

Your date conditional formatting is not working, perhaps because of the following reasons:
The supplied dates are invalid.
The supplied date values appear as dates, but they are text values.
The date formatting condition or rule specified in the New Formatting Rule window is incorrect.

Download Template

📥Download the ready-to-use Excel template to practice this tutorial yourself.

Download Excel Template

This has been a guide to What Is Conditional Formatting For Dates. We learn how to highlight dates based on given conditions with examples. You can learn more from the following articles –