Added thought - if you need instructions how to do this:
Press key combination Alt + F11
Select Insert - Module
When you see the blank window to the right, paste my above code there
Then, select your Excel sheet again, click on "Tools-Macro-Macros...
and highlight "delrows" from the list of macros in the window, then press "Run".
Hope this is helpful
Glenn
Main Topics
Browse All Topics





by: gtglonerPosted on 2006-10-16 at 16:13:21ID: 17743591
Slow - try pasting this code into the VBA window:
e
Sub delrows()
Range("A1").Select
r = 1
While Not IsEmpty(Selection)
If ActiveCell.Value <> ActiveCell.Offset(0, 1).Value Then
ActiveCell.EntireRow.Delet
Else
ActiveCell.Offset(1, 0).Select
End If
r = r + 1
Wend
End Sub