check a string of numbers for duplicates

Jaffa_ca

New Member
Joined
Oct 7, 2006
Messages
9
I'm trying to create a formula to check to see if a row of 4 cells with numbers in each cell is every duplicated. and then either highlight it or show the row number to where the duplicate is

example:
row a 1,2,3,4
row b 2,3,4,5
row c 3,4,5,6
row d 1,2,3,4

in this example row d would be the duplicate
i'm was trying to use vlookup without any success

would anyone here be able to help with this type of formula??
thanks in advance
Jeff
 

Some videos you may like

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.

James006

Well-known Member
Joined
Apr 4, 2009
Messages
3,680
Hello,

You have obviously posted an illustration of your question ...

How large is you actual file ...???
 

admiral100

Well-known Member
Joined
Jan 17, 2015
Messages
873
Hi,

Try this:-

F1 =IF(SUMPRODUCT(--($A$1:$A$4=A4),--($B$1:$B$4=B4),--($C$1:$C$4=C4),--($D$1:$D$4=D4)*1)>1,"Duplicates","No duplicates")


ABCDEF
11234Duplicates
22345No duplicates
33456No duplicates
41234Duplicates

<colgroup><col span="6"><col></colgroup><tbody>
</tbody>
 

James006

Well-known Member
Joined
Apr 4, 2009
Messages
3,680
Hello again,
@admiral100 ...

My assumption is that for cell F1 ... you meant :

Code:
=IF(SUMPRODUCT(--($A$1:$A$4=A1),--($B$1:$B$4=B1),--($C$1:$C$4=C1),--($D$1:$D$4=D1))>1,"Duplicate","")
 

admiral100

Well-known Member
Joined
Jan 17, 2015
Messages
873

ADVERTISEMENT

You're right :)
 

Rick Rothstein

MrExcel MVP
Joined
Apr 18, 2011
Messages
36,711
Office Version
  1. 2010
Platform
  1. Windows
You could also use this formula (I believe COUNTIFS is supposed to be more efficient than SUMPRODUCT)...

=IF(COUNTIFS(A$1:A$4,A1,B$1:B$4,B1,C$1:C$4,C1,D$1:D$4,D1)>1,"Duplicates","")
 
Last edited:

James006

Well-known Member
Joined
Apr 4, 2009
Messages
3,680

ADVERTISEMENT

Still wondering how large is the actual database ... both in terms of Rows and in terms of Columns .. ???
 

Jaffa_ca

New Member
Joined
Oct 7, 2006
Messages
9
Hello James

the database is 4 columns and 562 rows the columns may expand

it our database for our member numbers for our club, as people join the club the datas could grow larger in columns
 

James006

Well-known Member
Joined
Apr 4, 2009
Messages
3,680
Hello,

Your database is much smaller than what I was expecting ... :)

Basically ... both proposals of a Formula ... shown above should work out fine ...
 

Watch MrExcel Video

Forum statistics

Threads
1,123,158
Messages
5,600,054
Members
414,357
Latest member
Gemma_R

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