Capture value in worksheet & use in macro code

  • Thread starter Robert E. Leonard Sr
  • Start date
R

Robert E. Leonard Sr

in macro have code:
01=Range("a3").value


cell a3 is in worksheet & can contain word "Product:" or a number like 4

what code can I use to use what is captured in 01 above in a line of macro
code such as:

selection,autofilter filter = (value of 01)

I am trying to run an autofilter from fields located in worksheet.
thanks
rleonard
 
B

Bob Phillips

selection.autofilter Field:=1, Criteria1:= 01

or maybe

selection.autofilter Field:=1, Criteria1:= """ & 01 & """

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top