"gabarrao" wrote in message
...
Hello,
I have already done this. But even this way the list is too big. I
would like to find and automatic way.
Thanks very much,
Matheus
--
gabarrao
------------------------------------------------------------------------
gabarrao's Profile:
http://www.excelforum.com/member.php...o&userid=16885
View this thread: http://www.excelforum.com/showthread...hreadid=320598
This macro assumes your data starts at row 1, that column A is the one you
want to test for duplicates and that the data has been sorted on column A.
Change the Row= and Col= lines to change the target cells.
It will keep the first row of any dupes and continue until it finds a 2
blank cells.
Sub deletedupes()
Row = 1
Col = 1
Do Until Cells(Row, Col).Value = ""
Cells(Row + 1, Col).Activate
If Cells(Row + 1, Col) = Cells(Row, Col) Then
ActiveCell.EntireRow.Delete
Else
Row = Row + 1
End If
Loop
End Sub
Ian