View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Sebastian[_2_] Sebastian[_2_] is offline
external usenet poster
 
Posts: 3
Default Autofilter doesn't work

Thanks,

Sebastian


Selection.AutoFilter Field:=3, Criteria1:= "=" &

mycell.Value, _
Operator:=xlAnd

--
Regards,
Tom Ogilvy

"Sebastian" wrote in message
...
I need to filter data in a sheet using a string as
criteria.

The problem I encountered is I get the string in this

way:

Set mycell = Sheets("DPC").Range("Q3")

where in cell Q3 I insert a string key to perfom

filtering.

If I use this code it obviously doesn't work, as it look
for "my_value" not for the value itself

Selection.AutoFilter Field:=3, Criteria1:="=my_value",
Operator:=xlAnd

Whay can I do?

Thanks Sebastian



.