UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Excel Vb Autofilter    
 
   
sjsj2345
post Mar 4 2010, 12:30 PM
Post #1

UtterAccess Addict
Posts: 103



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
Go to the top of the page
 
+
sjsj2345
post Mar 8 2010, 03:28 PM
Post #2

UtterAccess Addict
Posts: 103



can anyone help with this one?
Go to the top of the page
 
+
fkegley
post Mar 8 2010, 04:00 PM
Post #3

UtterAccess VIP
Posts: 23,583
From: Mississippi



QUOTE (sjsj2345 @ Mar 8 2010, 08:28 PM) *
can anyone help with this one?


Maybe. Try this instead:

"=*" & Range(Sheet3!B2) & "*"
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 23rd May 2013 - 07:31 AM