Deleting Repetitions
Sub del
j = Cells(Rows.Count, 1).End(xlUp).Row
For i = j To 1 Step -1
If WorksheetFunction.CountIf(Range("A1:A" & j), Cells(i, 1).Value) 1 Then
Cells(i, 1).EntireRow.Delete
End If
Next i
End Sub
--
HTH
RP
(remove nothere from the email address if mailing direct)
"teresa" wrote in message
...
Hi, I have a list of 100 numbers which frequently repeat themselves,
I need to delete the rows with repetitions, leaving only unique entries ,
my code is missing a few lines, help is much appreciated
1
2
3
1
13
.
.
3
Sub del()
For i = 1 To 10
For j = 1 To 10
If Cells(i, 1) = Cells(j, 1) Then
Cells(i, 1).Rows.Delete
End If
Next
Next
End Sub
|