+ Reply to Thread
Results 1 to 10 of 10

Advanced Filter with Multiple Criterias

  1. #1
    Registered User
    Join Date
    02-12-2016
    Location
    Zurich, Switzerland
    MS-Off Ver
    MS Office 2013
    Posts
    94

    Advanced Filter with Multiple Criterias

    Hi everyone,

    I have a problem with my Advanced Filter Macro which doesn't seem to be working properly. When I had only a few criterias it worked like a charm but since I have added several others it seems to not filter correctly.

    I have attached the file. It shouldn't be protected anymore but if it asks for a PW it is "Online". Tax_Ruling_Directory_NEW.xlsm

    In advance many thanks for your help!

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

    Re: Advanced Filter with Multiple Criterias

    What is it you are actually trying to do within the worksheet(s)?
    If you are happy with my response please click the * in the lower left of my post.

  3. #3
    Registered User
    Join Date
    02-12-2016
    Location
    Zurich, Switzerland
    MS-Off Ver
    MS Office 2013
    Posts
    94

    Re: Advanced Filter with Multiple Criterias

    Hi stnkynts

    In the Interface sheet one can specify in the fields C6:AE6 the filter. Once the user clicks on Filter Data Excel displays the entries from the sheet Data that correspond with the chosen criterias from C6:AE6. The results are displayed in C8:AR8.

    Many thanks for your time!

    EDIT:

    Somehow, when I make the Criteria Range larger, from CriteriaRange:=Range("AS4:AX5") to CriteriaRange:=Range("AS4:AY5"), that's when the Filter Data stops working and no results are displayed when clicked on Filter Data button.
    Last edited by etaver87; 02-12-2016 at 12:03 PM.

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

    Re: Advanced Filter with Multiple Criterias

    So you are essentially trying to filter columns not rows (which is an issue) by the column header and copy those specific headers, with all the rows, to another sheet?

  5. #5
    Registered User
    Join Date
    02-12-2016
    Location
    Zurich, Switzerland
    MS-Off Ver
    MS Office 2013
    Posts
    94

    Re: Advanced Filter with Multiple Criterias

    Yes, exactly. It worked really well at one time but suddenly not anymore. I think it has to do with the columns that have either FALSE or TRUE as values. Do you know a workaround to make the filter work?

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

    Re: Advanced Filter with Multiple Criterias

    Change CriteriaRange:=Sheet1.Range("AS4:BU5") to CriteriaRange:=Sheet1.Range("AS4:BU4")

  7. #7
    Registered User
    Join Date
    02-12-2016
    Location
    Zurich, Switzerland
    MS-Off Ver
    MS Office 2013
    Posts
    94

    Re: Advanced Filter with Multiple Criterias

    in that case, he just displays all data from the Data sheet.

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

    Re: Advanced Filter with Multiple Criterias

    in that case, he just displays all data from the Data sheet.
    I thought that is what was desired

  9. #9
    Registered User
    Join Date
    02-12-2016
    Location
    Zurich, Switzerland
    MS-Off Ver
    MS Office 2013
    Posts
    94

    Re: Advanced Filter with Multiple Criterias

    Well, once I hit Filter it just copy & pastes the whole data from the Data sheet without filtering. It should filter according to what is specified in the Interface sheet in cells C6:AE6 .

    I tried adding the number of criteria step by step in a new file:

    Attachment 446483

    The filter Macro is the following in that new file:

    Please Login or Register  to view this content.
    Now, if a leave the criteria range like this the filter works great. However, as soon as I extend the criteria range to one more cell, i.e. CriteriaRange:=Range("M5:T6"), the filter stops working. It is very strange.

  10. #10
    Registered User
    Join Date
    02-12-2016
    Location
    Zurich, Switzerland
    MS-Off Ver
    MS Office 2013
    Posts
    94

    Re: Advanced Filter with Multiple Criterias

    Well, once I hit Filter it just copy & pastes the whole data from the Data sheet without filtering. It should filter according to what is specified in the Interface sheet in cells C6:AE6 .

    I tried adding the number of criteria step by step in a new file:

    Template-Tax-Time.xlsm

    The filter Macro is the following in that new file:

    Please Login or Register  to view this content.
    Now, if a leave the criteria range like this the filter works great. However, as soon as I extend the criteria range to one more cell, i.e. CriteriaRange:=Range("M5:T6"), the filter stops working. It is very strange.

+ 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. Advanced Filter, and multiple <> criteria
    By SILENTBRONCO in forum Excel General
    Replies: 10
    Last Post: 10-12-2015, 10:53 AM
  2. VBA to Hide/show columns based on a filter and multiple criterias
    By Daniel B in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-10-2014, 05:07 AM
  3. Replies: 0
    Last Post: 02-02-2014, 08:42 AM
  4. advanced filter - button to re apply advanced filter across multiple sheets
    By motmac87 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-05-2013, 11:16 PM
  5. Advanced Filter Multiple Rows of <>0
    By bmhalula in forum Excel General
    Replies: 1
    Last Post: 02-14-2012, 11:57 AM
  6. Advanced Filter with multiple criteria
    By inspiresit in forum Excel General
    Replies: 6
    Last Post: 08-12-2010, 11:21 AM
  7. Advanced filter on multiple criteria
    By agalloch in forum Excel General
    Replies: 2
    Last Post: 08-19-2009, 09:48 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