-
The following code seems to be running endlessly;
I have about 9000lines.
Can someone have a look please...
thanks
[VBA]Public Sub DeleteRows()
' Macro to delete rows that has "Check" in one of the columns
Const TEST_COLUMN As String = "X" '<=== change to suit
Dim i As Long
Dim iLastRow As Long
With ActiveSheet
Application.ScreenUpdating = False
iLastRow = .Cells(.Rows.Count, TEST_COLUMN).End(xlUp).Row
For i = iLastRow To 1 Step -1
If .Cells(i, "U").Value = "Check" Or .Cells(i, "X").Value = "Check" Then
'.Rows(i).Delete
MsgBox "Check Row"
End If
Next i
Application.ScreenUpdating = True
End With
End Sub
[/VBA]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules