Excel Formula Inquiry - Numbers to determine duplicate

Jerome_RA

Board Regular
Joined
Dec 26, 2016
Messages
53
Office Version
  1. 2013
Platform
  1. Windows
Hello, Can you help me with this..

So i have 5 numbers ; From A1 to E1 ; and going down and so on.
I want to get a formula to determine if that number from the rows has been used ; all 5 of them in any order.

so let say 17,16,15,11 and 10 from A1 to E1 has duplicates from another rows in any order, a message on probably F1 will say that it has duplicate

ABCDE
1011151617
116568544
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Do you want all five in a row or all five anywhere in the range your searching?
 
Upvote 0
Do you want all five in a row or all five anywhere in the range your searching?
all five in a row ; so for instance, A1 to E1 has a random number but A4 to E4 has the same numbers but not the same order as A1 to E1 ; ; it will still say duplicate
 
Upvote 0
Kind of like this

ABCDEF
1​
2​
3​
4​
5​
Duplicate
5​
3​
2​
4​
1​
Duplicate
7​
8​
9​
10​
11​
OK
7​
8​
9​
1​
2​
OK
 
Upvote 0
What version of excel are you using? (By the way, please update your profile so your version shows up on your button and the next person doesn't need to ask). Solutions may not be available in some versions of excel, or very complicated to accomplish.
 
Upvote 0
This solution uses BYROW and LAMBDA functions, if you get errors it may be because of your version:

Book1
ABCDEFG
112345DuplicateDuplicate
253241DuplicateDuplicate
37891011OKNo Duplicate
478912OKNo Duplicate
Sheet1
Cell Formulas
RangeFormula
G1:G4G1=IF(SUM(--(BYROW((A1=$A$1:$E$4)+(B1=$A$1:$E$4)+(C1=$A$1:$E$4)+(D1=$A$1:$E$4)+(E1=$A$1:$E$4),LAMBDA(r,SUM(r)))=5))>1,"Duplicate","No Duplicate")
 
Upvote 0
What version of excel are you using? (By the way, please update your profile so your version shows up on your button and the next person doesn't need to ask). Solutions may not be available in some versions of excel, or very complicated to accomplish.
Thanks ; I already updated my Profile. I havent done so in the past. My apologies.. Its Excel 2013 so the LAMDA function did not work for my version : (
 
Upvote 0
Thanks @Jerome_RA , yeah, your version of excel has me stumped. This is what I've come up with and it is by no means elegant.
What is worse you will need need huge help areas to avoid #SPILL errors.

I am very much hoping that a forum member that is very knowledgeable about #VALUE errors with array formulas will chime in. As, I am pretty sure that this can be done. I think the problem is that some functions only work with ranges and not arrays. So when an array has properly spilled it is now also in a range.

As you can see, I have two formulas (B12 and B19) that are based on array formulas that are spilled into ranges just above those formulas.
But, when I have used the same formula but having the array referenced I can't even commit the formula to the cell and get the described error.

NOTE: I hard coded the "2" in the formulas as I was stuck, but normally I would have used the row function to get a dynamic number in that part of the formulas.


Book1
ABCDEFG
111.002.003.004.005.00Duplicate
222.003.004.005.001.00Duplicate
337.008.009.0010.0011.00OK
447.008.009.001.002.00OK
5
6
700000
822222
900000
1000044
11
125=COUNTIF(B7#,2)
13
1400000
1522222
1600000
1700044
18
195=COUNTIF(B14#,2)
Sheet1
Cell Formulas
RangeFormula
B7:F10B7=((((((B1=($B$1:$F$4))*($A$1:$A$4)) +((C1=($B$1:$F$4))*(($A$1:$A$4))) +((D1=($B$1:$F$4))*(($A$1:$A$4)))) +((E1=($B$1:$F$4))*(($A$1:$A$4))) +((F1=($B$1:$F$4))*(($A$1:$A$4))))<>ROW(A1)) * ((((B1=($B$1:$F$4))*(($A$1:$A$4))) +((C1=($B$1:$F$4))*(($A$1:$A$4))) +((D1=($B$1:$F$4))*(($A$1:$A$4)))) +((E1=($B$1:$F$4))*(($A$1:$A$4))) +((F1=($B$1:$F$4))*(($A$1:$A$4)))))
B12,B19B12=COUNTIF(B7#,2)
D12,D19D12=FORMULATEXT(B12)
B14:F17B14=( (((B1=($B$1:$F$4))*ROW($A$1:$A$4)) +((C1=($B$1:$F$4))*ROW($A$1:$A$4)) +((D1=($B$1:$F$4))*ROW($A$1:$A$4)) +((E1=($B$1:$F$4))*ROW($A$1:$A$4)) +((F1=($B$1:$F$4))*ROW($A$1:$A$4))) <>ROW(A1)) * (((B1=($B$1:$F$4))*ROW($A$1:$A$4)) +((C1=($B$1:$F$4))*ROW($A$1:$A$4)) +((D1=($B$1:$F$4))*ROW($A$1:$A$4)) +((E1=($B$1:$F$4))*ROW($A$1:$A$4)) +((F1=($B$1:$F$4))*ROW($A$1:$A$4)))
Dynamic array formulas.



This is the pop up I get when I enter the formula in cell H1.


1705624907375.png


1705624879645.png
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,324
Members
452,635
Latest member
laura12345

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