Compare Dates in Two Columns - Highlight if the DD does not match

Mikec1012

New Member
Joined
Oct 24, 2017
Messages
30
Hello there.

I know I am kicking myself over this but I have two columns with dates - what is the way to highlight the cells/rows if just the day of the month differs? See below. The formula would highlight the two cells/rows based off the (DD differs) next to it.

[TABLE="width: 500"]
<tbody>[TR]
[TD]DUE DATE[/TD]
[TD]RANDOM[/TD]
[TD]OTHER DATE[/TD]
[/TR]
[TR]
[TD]10/20/2017[/TD]
[TD]fkgjk[/TD]
[TD]01/20/2019[/TD]
[/TR]
[TR]
[TD]10/19/2017[/TD]
[TD]dgsdgsd[/TD]
[TD]05/05/2020 (DD differs)[/TD]
[/TR]
[TR]
[TD]10/20/2017[/TD]
[TD][/TD]
[TD]01/20/2019[/TD]
[/TR]
[TR]
[TD]10/20/2017[/TD]
[TD][/TD]
[TD]01/20/2019[/TD]
[/TR]
[TR]
[TD]10/20/2017[/TD]
[TD][/TD]
[TD]01/10/2019 (DD differs)[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Assuming the data like below.

Excel 2010
A
B
C
DUE DATE
RANDOM
OTHER DATE
fkgjk
dgsdgsd

<tbody>
[TD="align: center"]1
[/TD]

[TD="align: center"]2
[/TD]
[TD="align: right"]10/20/2017
[/TD]

[TD="align: right"]1/20/2019
[/TD]

[TD="align: center"]3
[/TD]
[TD="align: right"]10/19/2017
[/TD]

[TD="align: right"]5/5/2020
[/TD]

[TD="align: center"]4
[/TD]
[TD="align: right"]10/20/2017
[/TD]
[TD="align: right"][/TD]
[TD="align: right"]1/20/2019
[/TD]

[TD="align: center"]5
[/TD]
[TD="align: right"]10/20/2017
[/TD]
[TD="align: right"][/TD]
[TD="align: right"]1/20/2019
[/TD]

[TD="align: center"]6
[/TD]
[TD="align: right"]10/20/2017
[/TD]
[TD="align: right"][/TD]
[TD="align: right"]1/10/2019
[/TD]

</tbody>
Sheet4

Select C2:C6 (assuming that is the one you want to highlight) In conditional formatting use this formula then select your formatting.
Code:
=DAY(A2)<>DAY(C2)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,828
Messages
6,181,209
Members
453,022
Latest member
RobertV1609

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top