Excel – Compare two date columns and highlight the newest

microsoft excelmicrosoft-excel-2010worksheet-function

I have two date columns in the same sheet. Column B receives its data from a vlookup function.

COLUMN A | COLUMN B

2013-07-05 | 2012-01-01

What I want to do, is to compare the two date columns and somehow highlight the newest date to be easily spotted.

The important thing here would be for the columns to clearly see which are the most recent dates. If it is not possible to highlight the column, an extra column would work as well but it should state the column name which hosts the recent date:

COLUMN A | COLUMN B | COLUMN C

2013-07-05 | 2012-01-01 | COLUMN A

Best Answer

You can use conditional formatting for that. You need two rules. Select the first column of dates and create a new conditional format with a formula: Home ribbon > Conditional Formatting > New Rule > Use a formula to determine. Enter this formula

=$A1>$B1

Note the placement of the $ signs. They are important!

Select a fill. Then select the second column of dates and create a rule with the formula

=$B1>$A1

Here is a screenshot:

enter image description here

Related Question