Conditional Formatting For Dates

Publication Date :

Blog Author :

Edited by :

Download FREE Conditional Formatting For Dates Excel Template and Follow Along!
Conditional Formatting for Dates Excel Template.xlsx

Table Of Contents

arrow

What Is Conditional Formatting For Date?

The Conditional Formatting for Dates is a feature where we highlight different dates in a dataset, such as due dates, weekends, holidays, date range, etc. The best way to do so is by using the “Conditional Formatting” by creating a New Rule, or by entering a simple formula. We can also use the “Format Painter” option available in Excel.

For example, in a month, we can highlight the weekends as shown below.

highlight the weekends

  • The Conditional Formatting for Dates helps in highlighting the required dates while preparing a calendar w.r.t holidays, weekdays, weekends, important dates, etc.
  • Since the formatting is for the dates, we use the TODAY and WEEKDAY functions, and also, for a date range, we use the COUNTIF function. If we must compare the dates as greater than, less than, or equal to, we can use the AND function.
  • The best application for this feature is when we want to highlight dates in a calendar for the upcoming project plan, and the dates just pop up with the formatted rules.

How To Use Conditional Formatting For Dates?

We can use the Conditional Formatting for Dates by setting a rule to highlight the required dates using the “Conditional Formatting” option in the “Home” tab.

Using Excel Conditional Formatting for Dates, we can perform the following for a date range in excel, namely,

  • Highlight Due Dates Which are Due Today.
  • Highlight Weekend Dates using Conditional Formatting.
  • Highlight Dates between Two Dates using Conditional Format.
  • Highlight All the Holidays Dates using a Conditional Format.

Grasping these principles is essential for anyone looking to excel in this area. For those who want to take their learning to the next level, this Automated Data Entry Form Using VBA Course is designed to build on this foundation and enhance their expertise.

Examples

We will consider examples to perform the above-mentioned highlighting.

Example 1 – Highlight Due Dates which are Due Today

When you work with the accounts team, either you work in the accounts receivable team or the accounts payable team. Both teams tend to work with due dates.

  • For an accounts receivable team, collecting the money on time is necessary.
  • Similarly, for a payable team, it is important to payout all the payments on or before the due date to avoid consistent follow-ups from vendors.

For example, let us look at the following invoice data.

Conditional Formatting For Dates Example 1

From the above, we have “Due Date” in this column. In addition, we have certain due dates over the due date, which are due today and are not yet due so far.

The steps to use Conditional Formatting to highlight dates are as follows:

1. First, select the due date column.

Conditional Formatting For Dates Example 1-1

2. Then, go to Conditional Formatting, and click New Rule.

Conditional Formatting For Dates Example 1-2

3. Now, choose “Use Formula to determine which cells to format”.

Conditional Formatting For Dates Example 1-3

4. In the Formula section, insert the TODAY formula, shown below, to identify the due dates.

Conditional Formatting For Dates Example 1-4

5. Now, click FORMAT, and choose the formatting color as desired.

Conditional Formatting For Dates Example 1-5

6. Now, click OK to apply the formatting.

Conditional Formatting For Dates Example 1-6

Now, let us look at the table in cell C7. It is highlighted because today’s date is “09th July 2019”, so Conditional Formatting has highlighted the due date. After all, we use the today in excel.

Similarly, we must apply to format for due dates beyond the due date. Again, we must use new Conditional Formatting, and insert the formula, as shown below.

Conditional Formatting For Dates Example 1-7

Now, click “OK”. As a result, it will highlight all the dates beyond the due date.

Conditional Formatting For Dates Example 1-8

So, the dates 6th July and 30th June are beyond the dates in the table above. However, the TODAY function is a volatile formula. It keeps changing daily, and no need to worry about today’s date.

Example #2 – Highlight Weekend Dates using Conditional Formatting

We will highlight only weekend dates with all the dates available.

For example, look at the below data of dates in the entire month.

Conditional Formatting For Dates Example 2

To highlight all the dates which belong to the weekend, we must follow the below steps.

In the formula section of the Conditional Formatting, insert the formula:

=WEEKDAY(A1,2)>5

Conditional Formatting For Dates Example 2-1

We will get the following result.

Conditional Formatting For Dates Example 2-2

Here, we have applied the WEEKDAY in excel formula with the following syntax,

Conditional Formatting For Dates Example 2-3

The WEEKDAY function checks all the selected cell dates and weekday numbers. For example, suppose the week starts from MONDAY (WEEKDAY(A1,2)), it will give the weekday number in the week. If the number provided by the WEEKDAY function is >5, i.e., Saturday and Sunday, it will highlight the weekend dates.

Example #3 – Highlight Dates between Two Dates using Conditional Format

For example, let us look at the below data of dates.

Conditional Formatting For Dates Example 3

We need to identify sales dates from this sales data between 23rd April 2019 and 24th September 2019.

So, we must open the “Conditional Formatting” tab, enter the formula below, and choose the formatting as per choice.

We have applied the AND function in excel here. It will identify the dates between 23rd April 2019 to 24th September 2019 and use the formatting.

Conditional Formatting For Dates Example 3-1

As a result, it will highlight the dates between those two dates, as shown below.

Conditional Formatting For Dates Example 3-2

Example #4 – Highlight All the Holidays Dates using a Conditional Format

For example, we can use Conditional Formatting if we have a list of dates and want to highlight all the holiday dates.

Conditional Formatting For Dates Example 4

In the above list, we have dates, and also a list of holidays that we need to highlight.

So, in Conditional Formatting, we must apply the below function.

Conditional Formatting For Dates Example 4-1

So, this will highlight all the holiday dates in the date list.

Conditional Formatting For Dates Example 4-2

Important Things To Note

  • Conditional Formatting works according to the new rule provided.
  • We can format the dates that are due today, which are beyond the due date, which are yet to be due, etc.
  • Using formulas in the condition, we can conduct logical tests.
  • We can apply only logical tests in excel in Conditional Formatting.

Frequently Asked Questions (FAQs)

1

Define Conditional Formatting for Dates in Excel.

Arrow down filled
2

Once applied, how can we remove the Conditional Formatting in Excel?

Arrow down filled
3

Is there an alternative way to copy the Conditional Formatting in Excel?

Arrow down filled