Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Which columns AutoFilter is on.

1st the question. If I use Set rng = ActiveSheet.AutoFilter.Range and
then do this rngColumns = rng.Address I can extract the columns from
here with Instr(Left/Right/Mid) or whatever. What I want to know how
to do is a for/next to determine which of these columns has its
individual filter turned on....

What I am ultimately trying to create is an add-in type of thing that a
user can take their spreadsheet and use the autofilter as they normally
do. And then when the want, click a button that will take what ever
filters that are "on" and SELECT DISTINCT or a GROUP BY or something
that will provide unique records for those select filters.

An example using 5 columns:

A B C D E
1 Model Accy_# P/N Supplier Price
2 341 125 213 Guys 1.25
3 341 222 213 Guys 1.25
4 411 574 213 Guys 1.25
5 411 222 444 Bobs 5.75
6 580 574 213 Guys 1.25
7 580 746 444 Bobs 5.75
8 580 222 213 Bobs 1.25
9 580 125 516 Guys 2.25


So in this example if the user selected the filter in column C and
choose 213 they would get all the models and accy_#'s with that - but
if they just have that one filter on and click the button I want to
ignore everything else and make a single row with that P/N on it
without having to go Data/Advanced Filter/Copy to another location,
unique records only...

Or if they selected a supplier (e.g. Guys) and click the button I want
to show only P/N 213 & 516.... I expect this to get harder as I dig
into it, but this is the high level view of what I'm trying to do...

Thanks

-Steve

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
autofilter on many columns inquirer Excel Discussion (Misc queries) 3 July 16th 06 04:32 AM
Which columns AutoFilter is on. [email protected] Excel Programming 1 June 21st 06 03:26 AM
Which columns AutoFilter is on. [email protected] Excel Programming 0 June 20th 06 11:50 PM
AutoFilter - non adjacent columns Richard Excel Discussion (Misc queries) 4 August 15th 05 12:15 PM
VBA to set which columns in Autofilter miker1999[_10_] Excel Programming 2 February 15th 04 02:44 AM


All times are GMT +1. The time now is 02:49 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"