Hi, the below code deletes everything that does not start with "W", how can i add another case where i need data that starts with "SMP", so delete everything that does not start with "W" and "SMP"
Code:
Public Sub ClearColB2()
Dim i As Long, _
LR As Long
Dim ShtRec As Excel.Worksheet
Set ShtRec = Sheets(gstrRec)
LR = ShtRec.Range("B" & Rows.Count).End(xlUp).Row
Application.ScreenUpdating = False
For i = LR To 6 Step -1
Select Case Left(ShtRec.Range("B" & i).Value, 1)
Case "W"
Case Else
ShtRec.Rows(i).Delete
End Select
Next i
End Sub