eliminating replicate rows

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

Guest

I have a 5000-row list in following forma

andrew
andrew
andrew
andrew
barbara
barbara
barbara

I want to go through whole list and eliminate replicates so the above sample will become

andrew
andrew
barbara
barbara

Ive tried the following- quite doesnt wor
Thanks in advanc

Sub Rowdel(

Dim jeff, ta
Range("b2").Selec
jeff = ActiveCell.valu
Do Until IsEmpty(ActiveCell.value
ActiveCell.Offset(1, 0).Selec
taz = ActiveCell.valu
If taz = jeff The
ActiveCell.EntireRow.Delet
End I
Loo
End Su
 
Range("A3").Select
LastIREF = ""
For j = 1 To RowsCount
If Activecell.Offset(0, 0).Value = LastIREF Then
Selection.EntireRow.Delete
Else
LastIREF = Avtivecell.Offset(0, 0).Value
End If
Activecell.Offset(1,0).select
Next j
 

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