Hello I am trying to remove rows based on the below code however I need to add another criteria, the word pink. How should the code be edited? I have tried to add Operator:=xlAnd, Criteria3:="<>*pink*" but that gave an error.
Sub DeletRows()
Application.ScreenUpdating = True
Dim Rng As Range
Set Rng = Range(Range("A3"), Range("A3").SpecialCells(xlLastCell))
Rng.AutoFilter Field:=10, Criteria1:="<>*test*", Operator:=xlAnd, Criteria2:="<>*black*"
Rows("4:" & Cells(Rows.Count, 1).End(xlUp).Row).Delete Shift:=xlUp
Selection.AutoFilter
Application.ScreenUpdating = False
End Sub
Bookmarks