+ Reply to Thread
Results 1 to 5 of 5

Advanced filter - data validation

  1. #1
    Registered User
    Join Date
    03-29-2014
    Location
    Monza Italy
    MS-Off Ver
    Excel 2007
    Posts
    7

    Advanced filter - data validation

    When I select a field from the DATA1 (item1) and press the FILTERME button I get the filtered data.
    If I want to use another filter, for example DATA3, in the list to select I find all the fields (100-200-300), while I would like to find only those that can affect the value of DATA1 (therefore the values 100 and 200 and not the value 300). I enclose example file. Can someone help me. Thank you.
    Attached Files Attached Files

  2. #2
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Advanced filter - data validation

    Your criteria range A2:F3 is set up to allow only one value per column. If you want to filter on more than one value per column then change the filter range in the code to add a row to the criteria range. eg. CriteriaRange:=Range("A2:F4"), Then you can filter on more than one value per column. But if you are filtering for a value in Column 1 and two values in column 3 then the value for column 1 must be entered on both row 3 and 4, else it will return all matches for the second value listed on row 4.
    Any code provided by me should be tested on a copy or a mock up of your original data before applying it to the original. Some events in VBA cannot be reversed with the undo facility in Excel. If your original post is satisfied, please mark the thread as "Solved". To upload a file, see the banner at top of this page.
    Just when I think I am smart, I learn something new!

  3. #3
    Registered User
    Join Date
    03-29-2014
    Location
    Monza Italy
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Advanced filter - data validation

    Thanks for the reply but unfortunately it doesn't work.
    If I select a value in column 1 when I select column 2 it shows me all the values ​​again while some do not concern the selection of column 1.
    Example: I select "item1" and then in column 2 I should find to select only the colors "WHITE" and "RED" and not the other colors "blue" and "yellow".
    Thank again for your help !!!

  4. #4
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,608

    Re: Advanced filter - data validation

    Say
    Data1= Item1
    Data2= White
    then In Data3 You want 100, 200

    Data1= Item1
    Data2= red
    then In Data3 You want 100

    Also is selection is done in consecutive way.
    Data1
    Data2
    Data3
    Data4
    etc...
    Last edited by kvsrinivasamurthy; 09-21-2020 at 07:13 AM.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  5. #5
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Advanced filter - data validation

    Your criteria range is not set up to filter for more than one value per column. I am not sure how you are using the table titled "Values" or if it comes into play at all for what you are attempting to do, But the filter works as it should when I make direct entries into the cells on row 3 and then click the Filter button.

+ 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. VBA Advanced Filter - Two Filters Without Deleting Bottom Filter Data In Same Column Range
    By hysterical.useless in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-14-2017, 02:54 PM
  2. Advanced Filter and Data Validation
    By cholmes in forum Excel General
    Replies: 4
    Last Post: 04-30-2014, 03:17 PM
  3. 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
  4. Second Advanced Filter does not work based on the data generated from the filter
    By mucc1928 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-29-2011, 02:42 PM
  5. Replies: 3
    Last Post: 05-15-2011, 11:46 AM
  6. Search Table - Advanced Filter/Data Validation?
    By EmilyB in forum Excel General
    Replies: 1
    Last Post: 01-12-2011, 01:35 AM
  7. VBA - Advanced filter with data Validation
    By Rubiks in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-18-2010, 02:32 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