View Single Post
  #11   Report Post  
 
Posts: n/a
Default

rinks wrote...
How would I apply this to identify duplicates within data that spans

multiple
columns?
Example:

Last Name First Name Address
Smith John 123 Main St
Adams Bill 456 Park St
Smith John 123 Park St

....

Many responses to how to do this after the fact. Better to avoid
duplicates in the first place, and you *can* use advanced filters for
that.

If the first list with column headings were in the active worksheet in
A1:C100 and the second list in XYZ!A1:C200, then copy the column
headings to E1:G1 and enter the folllowing formula in I2.

=SUMPRODUCT((A2=XYZ!$A$2:$A$200)*(B2=XYZ!$B$2:$B$2 00)*(C2=XYZ!$C$2:$C$200))=0

Now select the first list in A1:C100 and run the menu command Data
Filter Advanced Filter... . Choose 'Copy to another location', select
I1:I2 as the Criteria range and E1:G1 as the Copy to [range], check
'Unique records only', and click OK. This will put all records from the
first list with no 3-field match in the second list into columns E:G
with the first record in E2:G2.

Then copy the column headings into the row immediately below the last
extracted record in E:G, and run the menu command Data Filter
Advanced Filter... . Choose 'Copy to another location', change the List
range to XYZ!A1:C200, clear the entry for the Criteria range (don't use
any criteria), set the Copy to [range] to the newly copied row of
column headings in E:G, check 'Unique records only', and click OK. This
will add the 3-column distinct records from the second list to the
merged list in E:G. Finally, delete (as in Edit Delete, move cells
up) the second row of column headings in E:G. What's left in E:G is the
list without 3-column duplicates.