P
Peruanos72
I was given the following code and it works but I need to also add criteria
that is numeric only. When I add numeric only criteria it does not work.
Thoughts??
Sub DeleteRows()
Dim kpxRow As Long
Dim kpxTemp As Long
Const Criteria As String = "Y08,Y09"
With ActiveSheet
kpxRow = .Cells(.Rows.Count, "E").End(xlUp).Row
For kpxTemp = kpxRow To 1 Step -1
If InStr("," & Criteria & ",", "," & Left(.Cells(kpxTemp, _
"E").Value, 3) & ",") Then .Rows(kpxTemp).Delete
Next
End With
End Sub
that is numeric only. When I add numeric only criteria it does not work.
Thoughts??
Sub DeleteRows()
Dim kpxRow As Long
Dim kpxTemp As Long
Const Criteria As String = "Y08,Y09"
With ActiveSheet
kpxRow = .Cells(.Rows.Count, "E").End(xlUp).Row
For kpxTemp = kpxRow To 1 Step -1
If InStr("," & Criteria & ",", "," & Left(.Cells(kpxTemp, _
"E").Value, 3) & ",") Then .Rows(kpxTemp).Delete
Next
End With
End Sub