Full Version: Excel Vb Autofilter
UtterAccess Discussion Forums > Microsoft® Office > Microsoft Excel
sjsj2345
I am trying to create a Macro to filter based upon the value of a specified cell. When I record a macro and then view the code the actual value that i have in the cell is being listed in the code vs. what the current value is in the specified cell. See code below. The example is where it says Cenvoe I though it should have Sheet3!B2


Range("F9").Select
Sheets("Sheet3").Select
Range("B2").Select
Selection.Copy
Sheets("Sheet1").Select
Columns("E:E").Select
ActiveSheet.Range("$A$1:$AH$2126").AutoFilter Field:=5, Criteria1:= _
"=*Cenveo" * ", Operator:=xlAnd"
Range("A309:H2136").Select
sjsj2345
can anyone help with this one?
fkegley
QUOTE (sjsj2345 @ Mar 8 2010, 08:28 PM) *
can anyone help with this one?


Maybe. Try this instead:

"=*" & Range(Sheet3!B2) & "*"
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.