Explanation

This formula uses the TEXT function to concatenate the month and year of each date.

Then, the two dates are tested for equality.

Use other cells for input

You don’t need to hard-code a date into the rule.

Excel formula: Highlight dates greater than

To make a more flexible rule, it’s possible for you to use another cells like a variable.

This simplifies the formula and makes it easier to read.

Other formulas

There are several other formulas you could use to solve this problem.

Excel formula: Highlight dates between

TEXT Function

The Excel TEXT function returns a number formatted as text.

in a text string with the number format of your choice.

Excel formula: Count dates in given year

Excel DATE function

Excel TEXT function

Article image

Article image

Article image

Article image