Hi,
I am trying to add multiple filter in a column using macros.
For Example: In a column, I want to filter cells containing apple and orange but not banana or guava. So there are 4 conditions.
For 2 conditions, I am able to create below code but don't know how to extend this to satisfy all conditions.
I am new to macros so please help me with this. Thanks in advance.
--
Kunal
I am trying to add multiple filter in a column using macros.
For Example: In a column, I want to filter cells containing apple and orange but not banana or guava. So there are 4 conditions.
For 2 conditions, I am able to create below code but don't know how to extend this to satisfy all conditions.
HTML:
Sub Macro4()'' Macro4 Macro'
' ActiveSheet.Range("$A:$A").AutoFilter Field:=1, Criteria1:="=*apple*" _ , Operator:=xlAnd, Criteria2:="<>*banana*"End Sub
I am new to macros so please help me with this. Thanks in advance.
--
Kunal