September 21st, 1999, 05:13 PM
Hi!. I have to find duplicated registers within an Excel page (about 2000 register of 2 columns wide), and eliminate one of them but at the end keeping just one, I start the search by columns using the code below, but it always delete all the registers. How can I do this?...
Range("A1").Select
For cont3 = 1 To cont2
For cont = 1 To cont2
If ActiveCell.Offset(cont3, 0) = ActiveCell.Offset(cont, 0).Value Then
ActiveCell.Offset(cont, 0).EntireRow.Delete
End If
Next cont
Next cont3
Andres
Range("A1").Select
For cont3 = 1 To cont2
For cont = 1 To cont2
If ActiveCell.Offset(cont3, 0) = ActiveCell.Offset(cont, 0).Value Then
ActiveCell.Offset(cont, 0).EntireRow.Delete
End If
Next cont
Next cont3
Andres