Conditional Formatting Duplicates based on Date Comparisons

Duke.Togo

New Member
Joined
Aug 13, 2009
Messages
2
I apologize if this has been answered elsewhere, but searching didn't turn it up. My spreadsheet is setup in this manner (only showing columns needed for evaluation):

Date | Name

What I need to do is apply a format to a row only if the value in the Name column is duplicated in the table, and the difference between the Date in these duplicates is less than 30.

Thank you!
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Hi Duke.Togo
Welcome to the board

Assuming the dates in A2:A100 and the names in B2:B100, use for the conditional formatting in A2 the formula:

=SUMPRODUCT(--($B$2:$B$100=$B2),--(ABS($A$2:$A$100-$A2)<30),--($B$2:$B$100<>""))>1

Copy the format to A2:A100
 
Upvote 0
That worked fantastically, thank you! In reading through I can understand the logic of the functions used, but I am not familiar with the "--" and what its function is. I will have to do some reading on SUMPRODUCT. Thanks again!
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,751
Members
448,989
Latest member
mariah3

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