Consulting

Results 1 to 5 of 5

Thread: Selective Filtering

  1. #1
    VBAX Regular
    Joined
    Jul 2005
    Posts
    19
    Location

    Selective Filtering

    At present i have created 4 listboxes, using data validation and 'indirect', which based on list1 provides list2, which provides list3, and then list4. using advanced filter, i finally get 12 months of data. this part works well.
    however, i have also added "all" to lists 2,3 and 4.
    how can i, if "all" is chosen, lets say in list2, that the filter is unique based on list in list2, and not a combination of list1,list2, list3, and list4. if i select "all" in list 2, and there are 3 unique items in list, but in combination with list3 and list4, it comes back 12 times. i would want it to come back with only 3 items in list 2, and as a result, only 3 items in list 3 and 4, with the appropriate data rolled up
    same logic should apply if "all" is chosen in list3 or list4.
    basically, the column that has "all" should return a unique list, and subsequent lists, should be filtered based on the unique list proveded. i hope this makes sense.

    if "all" is not chosen, in any of the listboxes, let the normal advanced filter process prevail, (which works for me).

    can this be done? i appreciate any help you can provide.

  2. #2
    VBAX Master XLGibbs's Avatar
    Joined
    Jan 2006
    Location
    state of confusion, but vacation in denial
    Posts
    1,315
    Location
    Not exactly sure I follow you, but if you are using Indirect to identify a list, make sure something like a named range (if not for each of them) references "All" so that when that is selected in any box, it returns all records for that one list...
    If you have posted the same question at multiple forums, please read this IMPORTANT INFO.

    Please use the thread tools to mark your thread Solved


    Please review the Knowledge Base
    for samples and solutions , or to submit your own!




  3. #3
    VBAX Regular
    Joined
    Jul 2005
    Posts
    19
    Location
    i have done that. but when i select "all", there could be, for arguments sake, 6 unique entries in the list. however, in running the advanced filter, and selecting "unique", that list, in coordination with 3 other lists, could return 20 instances of the 6 unique items. what i would like, is if, "all" is selected, return the unique for that list. sort of a complicated if statement. thanks.

  4. #4
    VBAX Regular
    Joined
    Jul 2005
    Posts
    19
    Location
    just a thought. could someone possibly help me with a macro, based on an "if" statement.
    if cell contains the word "all", do advanced filter based on one criteriea, the cell with "all". if word does not appear, do advanced filter, with four criteria, which i have working at present. again, i would appreciate any help provided.

  5. #5
    VBAX Master XLGibbs's Avatar
    Joined
    Jan 2006
    Location
    state of confusion, but vacation in denial
    Posts
    1,315
    Location
    Can you attach a sanitized version of your workbook? It may be easier to set up a named range solution than you think...if you would prefer not to rely on code...but either way, sample data to work with is helpful..

    You can attach the file by going advanced>manage attachments.
    If you have posted the same question at multiple forums, please read this IMPORTANT INFO.

    Please use the thread tools to mark your thread Solved


    Please review the Knowledge Base
    for samples and solutions , or to submit your own!




Posting Permissions

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