Highlight the Date outside the deadline in Excel

Reading time: 3 minutes

How to highlight the date outside the deadline in Excel? You can use the standard date’s rules or create your own custom rules.

Internal Conditional formatting date rules

Excel has some date rules already recorded in the conditional formatting menu.

In the menu Home > Conditional formatting > Highlight Cells Rules > A Date Occurring…, 

Menu conditional formatting Date

You can create the following rules :

  • Yesterday
  • Today
  • Tomorrow
  • In the last 7 days
  • Last week
  • This week
  • Next week
  • Last month
  • This month
  • Next month
Conditional Formatting Date rules

To apply one of these rules it’s very easy.

  1. Select the cells with the dates to highlight
  2. Apply one of the rules (here, this week)
Use of the standard conditional formatting date rule

But with those standard rules there are many problems.

  • The number of rules is very limited
  • Not possible to create a rule greater than or lower than
  • All the rules are based on the date of Today
  • Not possible to include a variable like the x days before today

So, this dialog box is not very useful to highlight dates

Create your custom rule

The best technique when you want to highlight dates, it’s to build your custom rule.

To do that, you must create your own logical test.

Highlight Dates outside the deadline

In case you want to highlight all the dates outside the deadline, we must build a logical test with the function TODAY.

In our example, we can create the following test

=C2<TODAY()

To visualize the result of each test, you can write it in another column

Add a column with the logical test on Today

And then, you paste this formula, into the conditional formatting custom rule (Home > Conditional formatting > New Rule > Use a formula to determine which cells to format)

Convert the logical test into a conditional formatting rule

And immediately, all the dates under the date of today (29/06/2022) are in red

All the date outside the deadline are highlighted

Warning few days before to highlight the deadline

Now, we want to add another color. We want to color in orange the dates equal to today and 3 days before the deadline. This time, the test is more complex because we must write the 2 logical tests in an AND function.

=AND(C2>=TODAY(),C2<=TODAY()+4)

Warning when the dates are close to the deadline

Practice with exercises

Practice the TODAY function directly in the grid below.

TODAY Exercise - Spot invoices that are past due

Use TODAY() to flag overdue and upcoming invoices from their due date — 6 guided steps on a 10-invoice table.

Write the TODAY() function in G2

1 / 6

Display today's date with TODAY()

TODAY — Q1 · 145

Calculate D2 minus today's date in G2

2 / 6

Calculate the days remaining before the due date (D2 − today)

TODAY — Q2 · 146

Calculate D6 minus today's date in G2

3 / 6

Days remaining for FAC-005 (D6 − today)

TODAY — Q3 · 147

Write an IF comparing D2 to TODAY() in G2

4 / 6

IF invoice FAC-001 is overdue, display "Overdue", otherwise "OK"

TODAY — Q4 · 148

Write an IF comparing D7 to TODAY() in G2

5 / 6

IF invoice FAC-006 is overdue, display "Overdue", otherwise "OK"

TODAY — Q5 · 149

Compare D6−TODAY() to 30 in an IF — cell G2

6 / 6

IF the FAC-005 due date is less than 30 days away, display "URGENT", otherwise "OK"

TODAY — Q6 · 150

Your score is

0%

Related articles

Leave a Reply

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

Highlight the Date outside the deadline in Excel

Reading time: 3 minutes

How to highlight the date outside the deadline in Excel? You can use the standard date’s rules or create your own custom rules.

Internal Conditional formatting date rules

Excel has some date rules already recorded in the conditional formatting menu.

In the menu Home > Conditional formatting > Highlight Cells Rules > A Date Occurring…, 

Menu conditional formatting Date

You can create the following rules :

  • Yesterday
  • Today
  • Tomorrow
  • In the last 7 days
  • Last week
  • This week
  • Next week
  • Last month
  • This month
  • Next month
Conditional Formatting Date rules

To apply one of these rules it’s very easy.

  1. Select the cells with the dates to highlight
  2. Apply one of the rules (here, this week)
Use of the standard conditional formatting date rule

But with those standard rules there are many problems.

  • The number of rules is very limited
  • Not possible to create a rule greater than or lower than
  • All the rules are based on the date of Today
  • Not possible to include a variable like the x days before today

So, this dialog box is not very useful to highlight dates

Create your custom rule

The best technique when you want to highlight dates, it’s to build your custom rule.

To do that, you must create your own logical test.

Highlight Dates outside the deadline

In case you want to highlight all the dates outside the deadline, we must build a logical test with the function TODAY.

In our example, we can create the following test

=C2<TODAY()

To visualize the result of each test, you can write it in another column

Add a column with the logical test on Today

And then, you paste this formula, into the conditional formatting custom rule (Home > Conditional formatting > New Rule > Use a formula to determine which cells to format)

Convert the logical test into a conditional formatting rule

And immediately, all the dates under the date of today (29/06/2022) are in red

All the date outside the deadline are highlighted

Warning few days before to highlight the deadline

Now, we want to add another color. We want to color in orange the dates equal to today and 3 days before the deadline. This time, the test is more complex because we must write the 2 logical tests in an AND function.

=AND(C2>=TODAY(),C2<=TODAY()+4)

Warning when the dates are close to the deadline

Practice with exercises

Practice the TODAY function directly in the grid below.

TODAY Exercise - Spot invoices that are past due

Use TODAY() to flag overdue and upcoming invoices from their due date — 6 guided steps on a 10-invoice table.

Write the TODAY() function in G2

1 / 6

Display today's date with TODAY()

TODAY — Q1 · 145

Calculate D2 minus today's date in G2

2 / 6

Calculate the days remaining before the due date (D2 − today)

TODAY — Q2 · 146

Calculate D6 minus today's date in G2

3 / 6

Days remaining for FAC-005 (D6 − today)

TODAY — Q3 · 147

Write an IF comparing D2 to TODAY() in G2

4 / 6

IF invoice FAC-001 is overdue, display "Overdue", otherwise "OK"

TODAY — Q4 · 148

Write an IF comparing D7 to TODAY() in G2

5 / 6

IF invoice FAC-006 is overdue, display "Overdue", otherwise "OK"

TODAY — Q5 · 149

Compare D6−TODAY() to 30 in an IF — cell G2

6 / 6

IF the FAC-005 due date is less than 30 days away, display "URGENT", otherwise "OK"

TODAY — Q6 · 150

Your score is

0%

Related articles

Leave a Reply

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