View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Max
 
Posts: n/a
Default Remove duplicates

Here's one way using non-array formulas
to extract the unique lines in another sheet

Rename your source data sheet to just: X
So the source data is in X, cols A to C, data from row6
to a max expected row5000 (col headers in A5:C5),
with key col = col A (Ref Dr)

In a new sheet: Y
With the same col headers in A1:C1

Put in D2:
=IF(X!A6="","",IF(COUNTIF(X!$A$6:A6,X!A6)1,"",ROW ()))
Copy D2 down to D5000
(Leave D1 empty)

Then put in A2:
=IF(ISERROR(SMALL($D$6:$D$5000,ROW(A1))),"",
INDEX(X!A$6:A$5000,MATCH(SMALL($D$6:$D$5000,ROW(A1 )),$D$6:$D$5000,0)))

Copy A2 across to C2, fill down only as far as required to extract all the
unique lines
Eg: Fill A2:C2 down to say, C2000, if it's estimated that there's likely to
be less than 2,000 uniques

Y will return the unique lines from X, with all results neatly bunched at
the top
(Hide away the criteria col D if needed)

Adapt to suit ..
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---