I found the following elsewhere which works almost flawlessly, 'cept it removes the rows that I have already modified. How do I modify this so it removes the second row instead of the first?
Sub DelRowsColASame() s
Dim Lastcell As Range
Dim I As Long
Set Lastcell = Cells.Find("*", Searchdirection:=xlPrevious)
If Not Lastcell Is Nothing Then
'sort the list
Range(Cells(1, 1), Cells(Lastcell.Row, Lastcell.Column)).Sort _
Cells(1, 1), xlAscending, Header:=xlYes
'delete out a previous row if 1st column matches
For I = Lastcell.Row To 2 Step -1
If Cells(I, 1).Value = Cells(I - 1, 1).Value Then
Cells(I - 1, 1).EntireRow.Delete
End If
Next I
End If
End Sub
Bookmarks