Delete Duplicates

  • Thread starter Thread starter PA
  • Start date Start date
P

PA

I have created a formula in column Q which, after filled to the last row of
data identifies all of the duplicates by putting the SSN found in column K,
into the corresponding cell in column Q.
The formula is
=IF(AND(COUNTIF($P$2:$P$1740,P2)>1,COUNTIF($G$2:$G$1740,G2)>1),K2,"")

I need to write some code to delete all duplicates, except one.
Any suggestions are eagerly appreciated.
Paul
 
Thanks for coming back to me,
If I have 2500 records, and 1000 of them should be unique, there are 1500
duplicates in addition to the 1000 that should be unique. I need to find all
identical records, some will have 1 duplicate, some 2 or more, and some may
have none.
When the process is completed, only the 1000 unique records will remain with
no duplicates.
The data is coming from a Mainframe download.
Hopefully, I have explained better
Thank you
 
Yes, the entire row should be deleted, leaving behind only unique rows.
Being used to doing things with formulas, and manually, I guess I make a lot
of assumptions that I do intuitively when working with the file.
If originally there are 3000 rows, and 2000 rows are unique and there are
also 500 rows each with a duplicate, when done there will be 2500 rows. This
is an example and please keep in mind that there may be some records with
more than one duplicate.
We get a new text file from the Data Center each week and never know how
many records are contained.

I hope this clarifies the situation.
 
Thank you all for the feedback.
I fiddled around with Access over the weekend and came up with an excellent
method for identifying and deleting duplicates.
And I am particularly grateful to Jim Cone for teaching me how to ask a
question.
 
Back
Top