+ Reply to Thread
Results 1 to 5 of 5

Loop through columns determine if autofiltered

  1. #1
    Forum Contributor
    Join Date
    04-03-2009
    Location
    USA, California
    MS-Off Ver
    Excel 2007
    Posts
    385

    Loop through columns determine if autofiltered

    I am having difficulty with this one. i have 13 columns that have the possibility of being filtered. What I want to do is check each column for a filter and then remove the column arrow if it is not filtered...alternatively can I remove the filter arrow without removing the filter?

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,375

    Re: Loop through columns determine if autofiltered

    Hey randell,

    It seems to me that TABLES are filtered. A table is defined by a block of cells with no blank row or column in the middle of the cells. If your 13 columns are in the table and the table filter is turned on (the cells are treated as a table) then they are all available to be filtered.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Contributor
    Join Date
    04-03-2009
    Location
    USA, California
    MS-Off Ver
    Excel 2007
    Posts
    385

    Re: Loop through columns determine if autofiltered

    Thank you for taking the time to respond, however I am not any closer to understanding how to solve my problem. the end goal would be to turn off all filter arrows but still retain the filters is this possible?

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,375

    Re: Loop through columns determine if autofiltered

    Have you looked at using an Advanced Filter (in place)? I believe it won't show the top arrows but will hide the rows that don't match the filter criteria.

    http://www.contextures.com/xladvfilter01.html

  5. #5
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,565

    Re: Loop through columns determine if autofiltered

    the end goal would be to turn off all filter arrows but still retain the filters is this possible?
    No, the two are mutually exclusive.

    You can check if a filter exists and if so capture it's settings, then turn it off, run your code and the reapply the filter settings using a custom view like so:

    Please Login or Register  to view this content.
    HTH

    Robert
    ____________________________________________
    Please ensure you mark your thread as Solved once it is. Click here to see how
    If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1