View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Herbert Seidenberg Herbert Seidenberg is offline
external usenet poster
 
Posts: 1,180
Default Finding Duplicate Arrays in a table

This assumes you are familiar with dynamically named ranges.
Name the maximum size of your table.
Insert Name Define Names in Workbook ArrT
Refers to: =$A$1:$C$100 for a 3x100 array
Also define the following names
LenArr
Refers to: =COUNTA(INDEX(ArrT,,1))
ArrN
Refers to: =INDEX(ArrT,1,):INDEX(ArrT,LenArr,)
Fac1
Refers to: =--(INDEX(ArrN,LenArr,1)=INDEX(ArrN,,1))
Fac2
Refers to: =--(INDEX(ArrN,LenArr,2)=INDEX(ArrN,,2))
Fac3
Refers to: =--(INDEX(ArrN,LenArr,3)=INDEX(ArrN,,3))
Continue like this if you have more than 3 columns
If this formula is greater than 1, the last row entry is a duplicate:
=SUMPRODUCT(Fac1*Fac2*Fac3)
You can conditionally format this cell to draw your attention.
This formula will give you the location of the duplicate row:
=SUMPRODUCT(Fac1*Fac2*Fac3*ROW(ArrN))-LenArr