Use conditional formatting to identify dates earlier than today

Print Friendly, PDF & Email

During a Microsoft Excel training session a few week’s ago, I had a great question about using conditional formatting to highlight dates earlier than the current one, in other words, how can we highlight dates that occur in the past? This was a great question and so I thought I would publish a post this week about how to do this.

If you haven’t used conditional formatting in Excel before, be sure to check out my post outlining how to use conditional formatting in Excel.

  1. Open the workbook you wish to apply the formatting to
  2. Highlight the column which contains the dates you wish to work with
  3. From the Home tab select the Conditional Formatting button and choose New Rule
  4. The New Formatting Rule dialog box will appear:

  1. From the Select a Rule Type, choose Format only cells that contain
  2. In the Edit the Rule Description section you need to tell Excel that any cell which contains a date which is less than today’s date, highlight it.

Conditional Format Date

  1. In the Format only cells with section, leave the first drop down menu set as Cell Value
  2. For the next drop down menu change it to less than as shown below:

Conditional Format Date

  1. In the formula box type =TODAY()
  2. This formula will look for a cell value that is less than “today”:

Conditional Format Dates

  1. Now to specify a format you wish to apply, click the Format button
  2. I have chosen to have the text change to Red and Bold

Conditional Format Dates

  1. Click OK
  2. Click OK again to complete the Conditional Formatting rule
  3. Any dates which occur prior to today’s date will now appear in the formatting you selected:

Conditional Format Dates

Note: For the above example, today’s date is 20 February 2017.

Want to conditional format for a range of dates?

Click here to see how you can use conditional formatting for a range of dates.

Love this article? Comment below and let me know how you’ve utilised this feature. Be sure to check out my other Microsoft Excel content here.

Share on facebook
Facebook
Share on google
Google+
Share on twitter
Twitter
Share on linkedin
LinkedIn
Share on pinterest
Pinterest

10 Responses

  1. Hi i would like to ask for your help.
    I want to use conditional format for the following case:
    1. =($G14=10 …. if the days in $G14 are less than 10 days (expiring items) to be orange color the cell

    Where is my mistake ?
    Because all cells with dates older than TODAY are green. No orange color

  2. A formula produces a date in cell A1

    Conditional formatting on A1 to determine if A1 is < today() or not….. FAILS.

    Assume A1 = 3/30/20

    Assume today() = 3/24/20

    Conditional formatting on A1 should produce no change because the criteria was not met (i.e. < today() ). But it DOES produce the format change reserved for date is less than today() being true (a strike through)

    Assume A1 = 3/20/20

    Assume today() =3/24/20

    The format change to strike through occurs……..although since it occurs regardless, I don't consider that much of a test.

    I'm new to Office 2019…………….what I wish the conditional formatting to do worked fine on Office 2003, but fails on 2019. Clearly there is a flag somewhere that I am not setting properly.

    Any help would be appreciated

  3. I’ve searched & searched & hope you can help…
    I have a column with various due dates. I want the due date cells to highlight 15 days before the date entered (sort of a warning that the due date is coming up). So if I have a due date of 5/15/2020, i would like the cell to change colors on 5/1/2020, etc. Is there a way to do that?
    Thanks so much!

    1. Hi Maria,

      Because this is achieved using Conditional Formatting, and not an actual formula we are unable to have it ignore blank cells. If you only apply font based formatting such as bold text, or change the font colour, the blank cells will not change in appearance. If however, you apply formatting such as a Fill colour then blank cells will also be formatted. Simple switch the formatting type over to just the options on the Font tab within the Format Cells dialog box and you should have no formatting being applied to blank cells. Hope this helps.

      Belinda

  4. I tried several other search results, none of which worked. This is the only one that actually worked and was simple to do – thank you!

  5. Hi this is a great help but I want to add a second condition to clear when the task is completed by another cell having a Y entered in it – how do I do that please? (I don’t even know the terminology to look it up I’m afraid)

    1. Hi Sally,
      From what you have written I think you could use a combination of an IF statement and then conditional formatting to achieve what you are after. If you’d like to send a screenshot of your workbook to info@thetraininglady.com I’m happy to take a look at it and give you some details, or even upload a post to the site with instructions on how to achieve what you are after.
      Thanks,
      Belinda
      aka The Training Lady

Leave a Reply

Your email address will not be published. Required fields are marked *

eighteen + seven =

This site uses Akismet to reduce spam. Learn how your comment data is processed.