I have a worksheet with some 13,000 entries in column C. I would like my code to look down the column and delete the line above if the text value is the same. I wrote the following but found Excel 97 would simply crash.
On Error Resume Next
Dim cell As Range
Dim wks As Worksheet
Set wks = ThisWorkbook.Worksheets("Sheet1")
Set cell = wks.Range("c2") ' start at the second item
Do While cell.Value <> ""
If cell.Value <> cell.Offset(-1, 0).Value Then
cell.EntireRow.Delete ' Delete row
End If
Set cell = cell.Offset(1, 0)
Loop
Any suggestions before I go nuts??