PC Review


Reply
Thread Tools Rate Thread

AutoFilter.Filters--What column is being referenced when On?

 
 
BTuohy
Guest
Posts: n/a
 
      6th Dec 2006
How can one discern what column is being referenced when a filter is on?
For example, ActiveSheet.AutoFilter.Filters(1) might refer to what COLUMN
or RANGE when .On is true?

Thanks for your help.

BT in MN


 
Reply With Quote
 
 
 
 
BTuohy
Guest
Posts: n/a
 
      7th Dec 2006
T.O.:

Let's say that I have ten columns with filters but only two of them are On,
with a criteria. I can loop through the filters to see which ones are on
and get the criteria, but I do not have a way to determine which column it
is that has the filter on. Your code returns the first column in the range
being filtered but doesn't help identify where the filters are that are on.

Make sense?


"Tom Ogilvy" <(E-Mail Removed)> wrote in message
news:A5597C5F-251A-452C-9114-(E-Mail Removed)...
> activesheet.Autofilter.Range.columns(1).Column
>
> the filter count doesn't change.
>
> --
> Regards,
> Tom Ogilvy
>
>
> "BTuohy" wrote:
>
>> How can one discern what column is being referenced when a filter is on?
>> For example, ActiveSheet.AutoFilter.Filters(1) might refer to what
>> COLUMN
>> or RANGE when .On is true?
>>
>> Thanks for your help.
>>
>> BT in MN
>>
>>
>>



 
Reply With Quote
 
Tom Ogilvy
Guest
Posts: n/a
 
      8th Dec 2006
You picked the example. I showed you how to extend your example.

Use the same counter to identify the column.

Make Sense?

If you look at the code Dave has posted, you will see how that is done in
the first example.

--
Regards,
Tom Ogilvy




"BTuohy" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> T.O.:
>
> Let's say that I have ten columns with filters but only two of them are
> On, with a criteria. I can loop through the filters to see which ones are
> on and get the criteria, but I do not have a way to determine which column
> it is that has the filter on. Your code returns the first column in the
> range being filtered but doesn't help identify where the filters are that
> are on.
>
> Make sense?
>
>
> "Tom Ogilvy" <(E-Mail Removed)> wrote in message
> news:A5597C5F-251A-452C-9114-(E-Mail Removed)...
>> activesheet.Autofilter.Range.columns(1).Column
>>
>> the filter count doesn't change.
>>
>> --
>> Regards,
>> Tom Ogilvy
>>
>>
>> "BTuohy" wrote:
>>
>>> How can one discern what column is being referenced when a filter is on?
>>> For example, ActiveSheet.AutoFilter.Filters(1) might refer to what
>>> COLUMN
>>> or RANGE when .On is true?
>>>
>>> Thanks for your help.
>>>
>>> BT in MN
>>>
>>>
>>>

>
>



 
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
Dynamic query filters, like Excel's Autofilter Rob Microsoft Access Queries 1 23rd Jan 2007 07:04 PM
Re: AutoFilter.Filters--What column is being referenced when On? BTuohy Microsoft Excel Programming 1 7th Dec 2006 11:45 PM
How do I update filters when using Autofilter? =?Utf-8?B?U3VuR29kXzY5?= Microsoft Excel Worksheet Functions 3 25th Jul 2006 06:53 AM
AutoFilter on one sheet filters same on other sheets? Conan Kelly Microsoft Excel Programming 3 30th Mar 2006 05:32 AM
Turn ON Autofilter Filters =?Utf-8?B?ZGNIaWxs?= Microsoft Excel Programming 1 16th Jun 2005 07:53 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:17 AM.