Excel Macro: Action when field doesn't equal specific text
I have the following code which works for filtering all the cells where it doesn't equal zero.
With Sheets("Menu").Rows("10:10")
.AutoFilter Field:=8, Criteria1:="<>0"
.AutoFilter Field:=9, Criteria1:="<>0"
.AutoFilter Field:=10, Criteria1:="=0.00"
End With
How can I change the following code to filter when the text inside the cell doesn't equal "Apple"? If I add quotation marks around Apple, I get an error. Any help would be appreciated.
With Sheets("Menu").Rows("10:10")
.AutoFilter Field:=12, Criteria:="<>Apple"
End With
With Sheets("Menu").Rows("10:10") .AutoFilter Field:=8, Criteria1:="<>0" .AutoFilter Field:=9, Criteria1:="<>0" .AutoFilter Field:=10, Criteria1:="=0.00"End WithWith Sheets("Menu").Rows("10:10") .AutoFilter Field:=12, Criteria:="<>Apple"End With