View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Little Penny[_3_] Little Penny[_3_] is offline
external usenet poster
 
Posts: 48
Default Delete Row Select Case

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