L
Little Penny
I am trying to get this code to delete every row if the value in
column B begins with "X1".
I'm getting a syntax error any help would greatly be appreciated
Error here - Select Case Left((c, 2), 2)
Complete code:
Sub DeleteRowCase()
Dim c As Long
Dim LastRow As Long
Application.ScreenUpdating = False
LastRow = Range("C65536").End(xlUp).Row
For c = LastRow To 2 Step -1
Select Case Left((c, 2), 2)
Case Is = "X1": .EntireRow.Delete
Next c
End Select
Application.ScreenUpdating = True
End Sub
column B begins with "X1".
I'm getting a syntax error any help would greatly be appreciated
Error here - Select Case Left((c, 2), 2)
Complete code:
Sub DeleteRowCase()
Dim c As Long
Dim LastRow As Long
Application.ScreenUpdating = False
LastRow = Range("C65536").End(xlUp).Row
For c = LastRow To 2 Step -1
Select Case Left((c, 2), 2)
Case Is = "X1": .EntireRow.Delete
Next c
End Select
Application.ScreenUpdating = True
End Sub