Compare 2 columns and conditionally format duplicates Excel 2007

Anne Troy

MrExcel MVP
Joined
Feb 18, 2002
Messages
2,632
Office Version
  1. 365
Platform
  1. Windows
I would rather accomplish this with conditional formatting, but I am willing to do it with code.

The sample file is here: http://annetroy.com/ms/sample2columndupes.xlsx (what happened to being able to upload a workbook here? Hmmm.... anyway...)

I need to compare the values of the SET (both columns) of data in each row with the rest of the rows and highlight the duplicates.

Note that row 5 and row 6 are the same. Either the first record or second record or both should be formatted with red fill.
There is another set duplicated in rows 178 and 179.

I don't want to use a helper column. I know how to do that.

I thank you so much for your time. If you cannot understand my request, I will try to reword it.
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
maybe something like...

=SUMPRODUCT(($M$2:$M$707=$M2)*($N$2:$N$707=$N2))>1

in the conditional formatting dialog box
 
Upvote 0
I can't tell if it works because so many cells are blank. Is there any way to add the condition that they're not blank? Thanks, Weazel!
 
Upvote 0
How about something like...?

=SUMPRODUCT(($L$2:$L$707=$L2)*($M$2:$M$707=$M2)*($L$2:$L$707<>"")*($M$2:$M$707<>""))>1
 
Upvote 0

Forum statistics

Threads
1,214,426
Messages
6,119,411
Members
448,894
Latest member
spenstar

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