Search for duplicates won't work with multiple columns

leigh_ashlin

Board Regular
Joined
Feb 9, 2005
Messages
74
Hi, I have the following formula:

=IF(MAX(COUNTIF(Range1,Range1))>1,"Duplicates","No Duplicates")

This works great if I am looking for duplicates in a single column of data, but it doesn't work if I try it with 2 columns of data.

Does anybody know how I can modify this to search for duplicates from a 'column A' and a 'column B'? (this would be conducted after the duplicates have been removed from each of 'column A' and 'column B' individually)

Thanks - Leigh
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.

pgc01

MrExcel MVP
Joined
Apr 25, 2006
Messages
19,884
Hi Leigh

Please try:

Code:
=IF((MAX(COUNTIF(range1,range1)+COUNTIF(range2,range1))>1)+
(MAX(COUNTIF(range1,range2)+COUNTIF(range2,range2))>1),"Duplicates","No Duplicates")
This is an array formula and so MUST be entered with CTRL+SHIFT+ENTER and not just ENTER.

Hope this helps
PGC
 

Forum statistics

Threads
1,141,679
Messages
5,707,786
Members
421,527
Latest member
Tamiwsw

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
Top