How can I purge duplicate entries in Excel

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a large spreadsheet of name and addresses that has many duplicate
rows. Is there a way to remove duplicates without going through and checking
manually?
 
hi,
no you can do that real easy with a small macro.
This macro assumes that the whole row of data is a
duplicate and keys on column A. If you want to keys on
another column, then change the code were indicated.
Private sub DelDubs()
Dim Item1 As Range
Dim item2 As Range
Set Item1 = Range("A2") 'reset here for a different column
Do While Not IsEmpty(Item1)
Set Item2 = Item1.Offset(1, 0)
If Item1.Value = Item2.Value Then
Item2.EntireRow.Delete
Else
Set Item1 = Item2
End If
Loop
end sub
 
Bootsy said:
I have a large spreadsheet of name and addresses that has many
duplicate rows. Is there a way to remove duplicates without going
through and checking manually?

Well one way is to import the data into Access, the Microsoft Database
program and use the tools available in Access.

This is a newsgroup dedicated to questions about Access, the database
program in Office Professional. It appears your question may not be related
to these subjects. You may not even have Access available on your machine as
it is only included in the Office Professional Suite or available by itself.
The Microsoft help system is not all that clear and may have misdirected you
here.

It is best to ask your questions in a newsgroup dedicated to the
subject of your question. You should find people better able to address
your problem there.

Note: It is always best to indicate the name and version of any
program(s) you may be using when asking a question and also indicate the
operating system (like Windows XP or 98) when you ask a question.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top