Find duplicate including numbers are in different sequence/combination

bianbianchaoren

New Member
Joined
Jun 19, 2013
Messages
16
Ive been scratching my head on this for a while, appreciate any help I can get ?

basically I’m trying to identify if there is any duplicates in a column including numbers that are in different sequence/combination, the list of numbers will always be in a fixed length.

I.e
Column A
1234
2345
2234
3412

Result: cell for 1234 and 3412 will become red indicating the duplicates even though it’s in different combination or in another column B indicating Y/N works too

thanks in advance!
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Something like this, perhaps?
Book1 (version 2).xlsb
ABC
212341234Y
323452345N
422342234N
534121234Y
Sheet7
Cell Formulas
RangeFormula
B2:B5B2=CONCAT(AGGREGATE(15,6,--MID(A2,SEQUENCE(LEN(A2)),1),SEQUENCE(LEN(A2))))
C2:C5C2=IF(COUNTIF($B$2:$B$5,B2)>1,"Y","N")
 
Upvote 0
Something like this, perhaps?
Suggestion for alternative for B2
Excel Formula:
=CONCAT(SORT(MID(A2,SEQUENCE(LEN(A2)),1)))

@bianbianchaoren
I suggest that you update your Account details (click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

The suggestions above all require Microsoft 365
 
Upvote 0
Or still with MS 365 if it includes the LET function, it could be done without a helper column using Conditional Formatting with this formula or else use this same formula in an adjacent column to return True/False for dupes/non dupes.

21 03 21.xlsm
A
1
21234
32345
42234
53412
Dupes
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:A5Expression=LET(L,LEN(A2),seqa,SEQUENCE(,L),r,A$2:A$5,n,ROWS(r),seqb,SEQUENCE(,L*n,,9),seqc,SEQUENCE(,L*n,8,9),seqd,SEQUENCE(,n,,L),tj,TEXTJOIN("#",1,TEXT(ROW(r),"000000")&"|"&MID(r,seqa,1)),COUNT(FILTER(MID(CONCAT(MID(TEXTJOIN("|",1,SORT(MID(tj,seqb,8),,,1)),seqc,1)),seqd,L)+0,MID(CONCAT(MID(TEXTJOIN("|",1,SORT(MID(tj,seqb,8),,,1)),seqc,1)),seqd,L)+0=CONCAT(SORT(MID(A2,seqa,1),,,1))+0,""))>1)textNO
 
Upvote 0

Forum statistics

Threads
1,214,985
Messages
6,122,605
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