autofilter using macro

  • Thread starter Thread starter kkanil
  • Start date Start date
K

kkanil

Hello friends... I would be very happy if anyone could help me in
this...

I want to write a macro to autofilter a particular column > the input
given will be some string > the output i should get is all the entries
containing that string in that particular column.

I have used the below line for autofilter, but the problem is the
crieteria it takes is "equal", i want to put the critieria as "content"
which means i should get all the entries CONTAINING the particular
entry.

Selection.AutoFilter Field:=1, Criteria1:="customer"

any inputs??????

Thanks!!!!!!!!
Anil
 
Anil,

Try

Selection.AutoFilter Field:=1, Criteria1:="*customer*"


* is a wild card that matches any sequence of characters, including none.
 
Back
Top