+ Reply to Thread
Results 1 to 4 of 4

AutoFilter Get Criteria Array

  1. #1
    Registered User
    Join Date
    11-12-2014
    Location
    Toronto, Canada
    MS-Off Ver
    2010
    Posts
    2

    AutoFilter Get Criteria Array

    Good day!

    I need to save\restore the AutoFilter settings.
    There's a problem with multiple criteria on single column. While I can set the multiple criteria by:
    Please Login or Register  to view this content.
    How may I get the Criteria2 Array back into a variable?
    Thank you.

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: AutoFilter Get Criteria Array

    I am not sure what you are asking. If you are trying to remove the values associate with an array you can simply erase the array or ReDim the elements:

    Please Login or Register  to view this content.
    If you are trying to remove the visual component of the autofilter you would do something like this

    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,937

    Re: AutoFilter Get Criteria Array

    AFAIK, you cannot read the array - but you can read the visible cells of the filtered column and build up your array from that - use the array as a public variable for later reuse:

    Please Login or Register  to view this content.
    Last edited by Bernie Deitrick; 11-12-2014 at 05:00 PM.
    Bernie Deitrick
    Excel MVP 2000-2010

  4. #4
    Registered User
    Join Date
    11-12-2014
    Location
    Toronto, Canada
    MS-Off Ver
    2010
    Posts
    2

    Re: AutoFilter Get Criteria Array

    Quote Originally Posted by stnkynts View Post
    I am not sure what you are asking. If you are trying to remove the values associate with an array you can simply erase the array or ReDim the elements:

    Please Login or Register  to view this content.
    If you are trying to remove the visual component of the autofilter you would do something like this

    Please Login or Register  to view this content.
    My final goal is to save/restore Autofilter.
    When I switch to Sheet2, there's a combobox associated with the filtered data - Sheet1. Since I want the combobox to include all data, I need to remove Autofilter. But when I switch back to the Sheet1, I wish the Autofilter to be back to its previous state.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Autofilter Array Criteria
    By weeeee0713 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-16-2014, 03:45 AM
  2. Using an array as criteria in an AutoFilter
    By brucemc777 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-28-2014, 10:15 AM
  3. [SOLVED] AutoFilter: Array as Criteria
    By Klaster in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-10-2014, 06:36 PM
  4. [SOLVED] Using an array from a range for Autofilter Criteria
    By J-Tin in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-31-2013, 10:49 AM

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