Eliminating duplicate records in consecutive rows of a column

  • Thread starter Thread starter Larry
  • Start date Start date
L

Larry

Eliminating duplicate records in consecutive rows of a column

I have an Excel spread sheet that has 6,000 rows of text in one of the
columns. I want to be able to eliminate duplicate records.

Can this task be done automatically?

In additional to posting your solution to this group, can you please
cc: me at (e-mail address removed)
 
Sub test()
'Assumes your data is in Column B
Application.ScreenUpdating = False
'Amend range as necessary
Range("B1:B6000").AdvancedFilter Action:=xlFilterCopy, _
CopyToRange:=Range("C1"), Unique:=True
Columns("C:C").Copy Range("B1")
Columns("C:C").Delete Shift:=xlToLeft
Application.ScreenUpdating = True
End Sub

--
XL2002
Regards

William

(e-mail address removed)

| Eliminating duplicate records in consecutive rows of a column
|
| I have an Excel spread sheet that has 6,000 rows of text in one of the
| columns. I want to be able to eliminate duplicate records.
|
| Can this task be done automatically?
|
| In additional to posting your solution to this group, can you please
| cc: me at (e-mail address removed)
 

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