Check if Date is Before Today’s Date in Excel (2 Easy Ways)

Which orders are overdue? Which stock items were scheduled to be replenished before today? Which assignments are being submitted late?  What items have reached maturity or expiry?

Dealing with dates may be a regular part of your Excel work and keeping an eye on overdue items is crucial in any case. This system of overdue requires you to inspect the dates occurring before today's date. But in a sea of too much information, who has that good an eye for things?

Thankfully, Excel does. For starters, if these dates of interest are systematic and linear in your data (in columns or rows), you can sort them chronologically, the oldest dates first. Even so, the overdue dates require some sort of distinction, reddish or otherwise.

This tutorial will teach you how to check other dates against today's date using a generic formula, the TODAY function, and Conditional Formatting. Along with that, learn a few Excel tricks that can help you with your quest.

Let's get checking!

Table of Contents

Using Formulas

This is the main way to check if a date is before today because even with Conditional Formatting, it is the formula that will do the work. The core concept of the formula is to check whether the date in question is "less than" today's date or not. That's probably already giving you an idea of how to go about this.

Let's use an example to better explain the works. In our example case, the current date is the 31st of October 2022. The date has been entered in cell E2. We have a list of customer orders with the order date, delivery days, and estimated delivery date mentioned. As the deliveries are completed, the orders are cleared from this list.

The objective is to find which orders have deliveries overdue so that they can be tended to quickly. Now is where the formulas come in and do their job.

Using Generic Formula

Checking if a date falls before today can be done without delving into anything technical. You can use a simple formula where you check if the date is less than the date today. And… job done! Let's put the no-nonsense formula to the test. Use a formula like the one below to check if today's date comes after a date:

`=E5<\$F\$2`

With this formula, we are checking if the date in E5 i.e. 31-Oct-22 occurs before the date in F2 which is 31-Oct-22. The "before" bit of the formula is checked with the less than sign, meaning is E5's date less than F2's date? Since both the dates are the same and one is not less than the other, the formula returns FALSE.

In the next instance, we will be checking E6 against F2. F2 remains constant against the dates in column E because it has been locked as an absolute reference with \$ signs. 30-Oct-22 is lesser than the 31st so we get a TRUE this time. This means that the date in E6 is before the current date entered in F2. So on, and so forth, we get the F column filled with this formula:

Nice going. But we need better going. Wouldn't it be better to have something a little more prominent than TRUE and FALSE stacked up? It would indeed. Let's see what we can do about that.

Using TODAY Function

We can check a date against the current date with help from the TODAY function. The TODAY function returns the current date in the default date format. We can have a little demonstration before we proceed to the actual objective.

In our case example, we will enter today's date using the TODAY function instead of manually punching it in. We have entered this date with the TODAY function without any arguments and we get 31-Oct-22 as the result:

In this circumstance, you can still resort to the formula used above i.e. =E5<\$F\$2

Now if we were to use the formula plainly as we did earlier, we'd use the logical test as:

`=E5<TODAY()`

But that would give us TRUEs and FALSEs again. So let's have the formula that we will be working with to check the current date against the dates in column E, to see if they are before or after the 31st. Using the TODAY and IF functions, we get:

`=IF(E5<TODAY(),"Late","")`

The logical test that we were going to use on its own has been nested in the IF function. The IF function will check if E5's date is less than (and therefore earlier than) the date today (supplied by the TODAY function). We know the answer to that is FALSE.

Upon returning TRUE, the IF function is set to return the text string "Late" (as has been done in the second instance). For FALSE the result is to be an empty text string (denoted by a pair of double quotes "") as returned in F5:

If you've figured out the plus point of integrating the TODAY function, 10 points to you. The plus is that TODAY will have dynamic results; updating column F as the date changes. Taking the example of our case, the next day, on the 1st of November, the results will be "Late" for F5 – F6 and F10 – 14.

That is because all these dates will fall before the 1st of November. To keep the results on your worksheet static, skip using the TODAY function and stick to a generic formula like in the previous section.

Working with Missing Dates

Incorporating other factors into the mix, suppose we have some estimated delivery dates missing as the delivery dates of some orders are unknown. With missing dates, either of the formulas from above would equate to TRUE, as a missing date can't be said to not be before the current date.

This would be a little misleading, and the fix for this mix is the ISBLANK function. The formula below will help you to check if a date comes before the current date while dealing with missing dates:

`=IF(ISBLANK(E5),"",IF(E5<TODAY(),"Late","---"))`

Now we have geared up the formula to return an empty text string "" upon finding a blank cell in column E, indicating a missing date. If not, meaning if a date is found, then the date should be tested for falling before today's date (as provided by the TODAY function). If yes, then we get "Late", or else we get "—".

Using Conditional Formatting

The second major way is using Conditional Formatting to check if the current date is before or after another date. Conditional Formatting is a very visual method of highlighting data that meets a certain condition in Excel. The A Date Occurring rule in Conditional Formatting provides a few earlier date options:

Using these preset options can highlight yesterday's date or dates having occurred in the last 7 days, last week, or last month.

We will aim to highlight those dates in Excel that precede today's date by a Conditional Formatting rule. Go through the steps below to see the rule we're applying through Conditional Formatting to check if a date is before the current date:

• Select the cells with the dates that you want to check against today's date.
• Select the Conditional Formatting icon from the Styles group in the Home
• From the menu, go to Highlight Cells Rules > Less Than.
• In the opened dialog box, type the following formula:
`=TODAY()`
• Use the next bar to set the format for the highlighted cells.
• The background of this rule is what we have seen in the earlier sections; checking the date to be less than the date today. From the selected cells, Conditional Formatting will highlight all the cells meeting this condition in Light Red Fill with Dark Red Text.
• Click on the OK button in the dialog box.

The dates falling before the 31st of October will be highlighted:

Let's tweak the data a bit so that along with these highlighted 3 dates, we'll have the date 28th October which will be the date furthest behind the 31st in the dataset. Leaving the previous Conditional Formatting rule as it is, 28th will then also be highlighted in light red. If we add another rule similar to the previous one, the only change is in the TODAY function as follows:

`=TODAY()-2`

This will highlight the dates less than 2 days from today and we've chosen red fill so it further stands out:

All days that are two or more days before today will be highlighted in red fill. However, make sure to keep the second rule in top preference otherwise the dates will only fall under the first rule. The preference can be changed in the Conditional Formatting Rules Manager.

This was how to use the TODAY function to highlight dates more than x days before the current date. E.g. highlighting the dates more than 2 weeks before the current date can be done with the Less Than rule with the following input formula:

`=TODAY()-14`

With the Between Highlight Cells rule, Conditional Formatting can highlight the dates occurring, let's say, between 2 weeks to a week before today like so:

Conditional Formatting provides a very easily deducible visual, right? The longer dues in a darker shade. You can leave that all to Excel and set this up in a matter of seconds with Conditional Formatting's Color Scales option. To apply it, go to the Home tab > Conditional Formatting icon > Color Scales and choose a Color Scale. We've chosen a 2-Color Scale.

The Color Scale will be applied immediately highlighting the earliest date in red and shading the dates as per the Color Scale tones to the latest date in white.

While this is cool, it's missing the TODAY component. We have a little trick to make this Color Scale relevant to the date today so head to the Rule Manager and edit the rule involving this Color Scale.

On the Maximum side that is represented by the white color, change the Type to Number. In the Value field, enter the TODAY function as:

`=TODAY()`

The purpose of these changes is to limit the Color Scale to just the current date instead of the latest date in the selected cells. Apply the changes with the OK command.

See the change in the Conditional Formatting? Now only the dates before the current date are prominent while the current date and beyond are white.

And here's where we check out. That was our tutorial with some easy tricks on checking if a date is before today's date in Excel where the TODAY function can play a very convenient role. While you're getting your way around with dates, we'll work on more Excel matter for your checking.