PC Review


Reply
Thread Tools Rate Thread

Capture value in worksheet & use in macro code

 
 
Robert E. Leonard Sr
Guest
Posts: n/a
 
      9th Aug 2006
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


 
Reply With Quote
 
 
 
 
Otto Moehrbach
Guest
Posts: n/a
 
      9th Aug 2006
selection,autofilter filter = 01


"Robert E. Leonard Sr" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
Bob Phillips
Guest
Posts: n/a
 
      9th Aug 2006
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)

"Robert E. Leonard Sr" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to code macro for worksheet? Eric Microsoft Excel Programming 4 17th Feb 2009 02:15 AM
How to code macro for worksheet? Eric Microsoft Excel Programming 0 16th Feb 2009 05:11 AM
How to code macro for worksheet? Eric Microsoft Excel Worksheet Functions 1 12th Feb 2009 06:14 AM
How to code macro for worksheet? Eric Microsoft Excel Programming 0 12th Feb 2009 05:19 AM
Macro to capture worksheet names =?Utf-8?B?RWwgQmVl?= Microsoft Excel Worksheet Functions 2 13th Jul 2006 05:56 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:03 PM.