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
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Hello,

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

How large is you actual file ...???
 
Upvote 0
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>
 
Upvote 0
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","")
 
Upvote 0
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:
Upvote 0
Still wondering how large is the actual database ... both in terms of Rows and in terms of Columns .. ???
 
Upvote 0
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
 
Upvote 0
Hello,

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

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

Forum statistics

Threads
1,214,985
Messages
6,122,606
Members
449,089
Latest member
Motoracer88

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