Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help: Autofilter doesn't work
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Autofilter doesn't work
Set mycell = Sheets("DPC").Range("Q3")
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Autofilter doesn't work | Excel Discussion (Misc queries) | |||
custom autofilter does not work | Excel Discussion (Misc queries) | |||
SUBTOTAL(9,range) Does NOT work in AutoFilter | Excel Worksheet Functions | |||
Autofilter on protected work book? | Excel Discussion (Misc queries) | |||
Autofilter(Top 10...): What does it do? How does it work? | Excel Discussion (Misc queries) |