I am trying to delete rows that contain text with a special character in column O. The text I am searching for contains PO# and will look something like this PO#B7605887-1, so I need it to be PO#* so it catches the text if it contains anything after the special character.
The code I created below is not working. What am I doing wrong?
Sub Delete_POnums()
Dim k As Long 'PO#
On Error GoTo 0
With ThisWorkbook.Sheets("Call Data").Range("O:O")
For k = .Cells(.Rows.Count, 1).End(xlUp).Row To 1 Step -1
With .Cells(k, 1)
If CStr(.Value) Like "PO" & Chr(35) & "*" Then .EntireRow.Delete Shift:=xlUp
End With
Next k
End With
End Sub
Bookmarks