+ Reply to Thread
Results 1 to 6 of 6

"carry over" filter settings

  1. #1
    Forum Expert JasperD's Avatar
    Join Date
    05-07-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    1,393

    "carry over" filter settings

    Hi guys and girls,

    my sheet has 35 columns with data, that user can filter on (standard autofilter).
    The sourcedata is in another sheet. I cannot use a pivottable.

    When the users presses a button, the source data gets updated.

    a) The autofilter gets removed
    b) The rows with data get cleared
    c) New data gets copied over into the sheet
    d) Autofilter gets applied on the columns with data.

    Now what I'd want to accomplish is that the new autofilter (after updating the data) gets filtered on the same columns and values as the user had originally filtered on.

    What would be the most efficient way to get this accomplished?

    Thanks for any help!

    Jasper

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: "carry over" filter settings

    Hi,

    See the file associated with post #4 in the following thread: http://www.excelforum.com/excel-prog...ml#post3883023

    The application is slightly different (synchronizes AutoFilter across several sheets), but you should be able to adapt that contents of Sub SynchronizeAutoFilterCriteriaAcrossAllSheets() in module ModAutoFilter to your needs.

    Please let me know if you need additional help.

    Excerpts from the code are included here for illustration purposes only. The code probably won't run without all the resources included in the referenced file.
    Please Login or Register  to view this content.
    Lewis

  3. #3
    Forum Expert JasperD's Avatar
    Join Date
    05-07-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    1,393

    Re: "carry over" filter settings

    Hi LJMetzger,

    many thanks for your help!
    I was googling myself as well and found this post: http://stackoverflow.com/questions/9...defined-filter
    That one looks more condensed and less dependent on addins / references, so will try that one first and alternatively use yours.
    I'm sure either one works, so closing this thread.
    Thanks again,

    Jasper

  4. #4
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: "carry over" filter settings

    Jasper,

    Your welcome and thanks for the rep points.

    The link you referenced looks like it will work fine. Unless efficiency and/or speed is an issue, my code tends to be long because it is a lot easier for me to debug that way.

    Lewis

  5. #5
    Forum Expert JasperD's Avatar
    Join Date
    05-07-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    1,393

    Re: "carry over" filter settings

    I went for the shortest code I could find and it works absolutely fine:

    Please Login or Register  to view this content.
    However - I really do appreciate your answer and effort. A lot of times people just have the tendency to not reply. I try to help people on the forum if I can, so appreciate it if I see someone doing the same Have a great day.

  6. #6
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: "carry over" filter settings

    Jasper,

    Thanks for the feedback and thanks for sharing your final code. It is much appreciated.

    Lewis

+ 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. Replies: 7
    Last Post: 03-17-2014, 01:51 PM
  2. Replies: 0
    Last Post: 08-30-2012, 04:39 PM
  3. Replies: 2
    Last Post: 08-02-2011, 06:57 AM
  4. Replies: 7
    Last Post: 03-17-2010, 07:27 AM
  5. "Criteria Range" in the "Data/Filter/Advanced Filter" to select Du
    By TC in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-11-2005, 10:06 PM

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