Hi guys,

I'm bumping with my code at a cell which contains an asterisk. The code clears content of criteria FIND "pp" in column J and the first characters in column E.

Sub Code()

    Dim l As Long
    Dim lRow As Long
    Dim strTest As String
    
    Application.ScreenUpdating = False
    
       
        Range("E7").Select
    Range(Selection, Selection.End(xlDown)).Select
    Selection.NumberFormat = "0"
    
    lRow = Range("A65536").End(xlUp).Row
    
    For l = 2 To lRow
        If Range("J" & l).Value = "PP" Then
            strTest = Range("E" & l).Value & "*"
            Range("E" & l).Offset(1, 0).Select
            Do Until Not ActiveCell.Value Like strTest
                ActiveCell.Offset(0, 6).ClearContents
                ActiveCell.Offset(1, 0).Select
            Loop
        End If
    Next l
    
End Sub
Does someone has a workaround?