Multiple criteria on an Autofilter from a singe cell

Thanks Thanks:  0
Likes Likes:  0
Results 1 to 7 of 7

Thread: Multiple criteria on an Autofilter from a singe cell

  1. #1
    Board Regular
    Join Date
    Jun 2010
    Posts
    250
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Multiple criteria on an Autofilter from a singe cell

     
    Hi,

    I'm trying to add to my code an autofiler with multiple criteria, the criteria is held in single cell. The criteria is made up of anything from 5 to 30 cells, then i have tried to concatentate these separated by commas, in speech marks, speech marks and commac etc, set them as an array the use that in my filter, but nothing seems to work.

    Can anyone help how to do this?

    Thanks in advance

    Blunder

  2. #2
    Board Regular
    Join Date
    Aug 2011
    Location
    AMS
    Posts
    1,908
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Multiple criteria on an Autofilter from a singe cell

    how is the cell with the criteria formatted the values are separated by commas??
    and in which cell is it?

  3. #3
    New Member
    Join Date
    Feb 2013
    Posts
    44
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Multiple criteria on an Autofilter from a singe cell

    Can this Filter method be used to sort out Unique entries, by acct nbumber, then by most columns filled in with data amoung the duplicate acct numbers?

    For example: 2 rows with the same acct #, one row has 10 columns of text and the other only 5. - How could I get excel to filter for rows with the most columns filled in?

  4. #4
    Board Regular
    Join Date
    Aug 2011
    Location
    AMS
    Posts
    1,908
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Multiple criteria on an Autofilter from a singe cell

    Quote Originally Posted by ex650r View Post
    Can this Filter method be used to sort out Unique entries, by acct nbumber, then by most columns filled in with data amoung the duplicate acct numbers?

    For example: 2 rows with the same acct #, one row has 10 columns of text and the other only 5. - How could I get excel to filter for rows with the most columns filled in?
    are you in the wrong thread???

  5. #5
    Board Regular
    Join Date
    Jun 2010
    Posts
    250
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Multiple criteria on an Autofilter from a singe cell

    The range will be G1 to say G15 and will contain text similar to the below
    ABC123
    ABC124
    ABC125
    ABC126
    ABC127
    ABC128
    ABC129
    ABC130
    ABC131
    ABC132
    ABC133
    ABC134
    ABC135
    ABC136
    ABC137
    then i have created in cell H1 the below:
    "ABC123","ABC124","ABC125","ABC126","ABC127","ABC128","ABC129","ABC130","ABC131","ABC132","ABC133","ABC134","ABC135","ABC136","ABC137"
    the tried tried to use that cell in the autofiler:-
    activesheet.usedrange.AutoFilter Field:=4, Criteria1:=Array(Range"H1").value), Operator:=xlFilterValues

  6. #6
    Board Regular
    Join Date
    Aug 2011
    Location
    AMS
    Posts
    1,908
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Multiple criteria on an Autofilter from a singe cell

    what office version you are using?

    check out this page is well explained
    Excel AutoFilter With Criteria in a Range | Contextures Blog

  7. #7
    Board Regular
    Join Date
    Jun 2010
    Posts
    250
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Multiple criteria on an Autofilter from a singe cell

      
    Quote Originally Posted by hippiehacker View Post
    what office version you are using?

    check out this page is well explained
    Excel AutoFilter With Criteria in a Range | Contextures Blog


    That link gave teh answer i needed. Thank you for you help

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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

 

 
DMCA.com