+ Reply to Thread
Results 1 to 12 of 12
  1. #1
    Registered User
    Join Date
    01-08-2010
    Location
    nj
    MS-Off Ver
    Excel 2003
    Posts
    4

    Advanced filter for <> several text strings

    Hello everyone. I apologize in advance if my lack of experience with excel makes my question seem ridiculous.

    i have a lot of data which i am going to be running an advanced filter on. One of the criteria i am trying to filter for is a list of text values that i want to make sure a row does not contain. Lets say for example I have a list of 2 text values in column "symbols" that i would like to omit in my filtered results, "abc" and "xyz".
    As of now I can only set up a criteria to omit one of those.

    Symbol
    <>abc

    this works right now.


    But if i try to put <>xyz in the cell immediately under there, I thought its supposed to be filtering for symbol that does not equal abc or xyz, but instead it doesnt filter anything out. I think it may be a syntax error or something else that I am doing wrong. Can anyone point me in the right direction?

    Ideally, I would like to be able to filter out a list of text values that I keep in another column. Like lets say today I wanted to omit "abc" "xyz" and "lmnop" and I would have the advanced filter criteria just reference that list of values as what I would like to filter out. Except there would probably be a list of at least 20 to 30 values, that change over time, so it would be much easier to just keep it all neat in one column that I can edit as I need to.

    I hope this is not as difficult to do as it is to explain what I am trying to do in this forum. Thanks in advance to any excel experts who can help me.

    -ilscfn

  2. #2
    Forum Moderator pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2010
    Posts
    5,141

    Re: how to advanced filter for <> several text strings

    Hi ilscfn
    Do you need an advanced filter?
    regards pike

    If the solution helped please donate
    here to the RSPCA

    Sites worth visiting;

    J&R Solutions - royUK

    AJP Excel Information - Andy Pope

    Spreadsheet Toolbox

    JBeaucaires Excel Files

    VBA for smarties - snb

  3. #3
    Forum Moderator pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2010
    Posts
    5,141

    Re: how to advanced filter for <> several text strings

    have a look at this example
    Attached Files Attached Files
    regards pike

    If the solution helped please donate
    here to the RSPCA

    Sites worth visiting;

    J&R Solutions - royUK

    AJP Excel Information - Andy Pope

    Spreadsheet Toolbox

    JBeaucaires Excel Files

    VBA for smarties - snb

  4. #4
    Registered User
    Join Date
    01-08-2010
    Location
    nj
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: how to advanced filter for <> several text strings

    Thanks for the response pike.

    I now see that I can do it this way. Thanks for the help.

    As I said in my original post though, I will end up having to filter out 20 or more symbols, that change frequently. Because of this, if there is a way to have it reference a list of symbols and omit any rows with those symbols, that would make it a lot easier than going and adding and subtracting many cells in a long row of filter criteria, with the qualifier <> ahead of it. Any ideas of how to do this? thanks.

    ils

  5. #5
    Forum Moderator pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2010
    Posts
    5,141

    Re: Advanced filter for <> several text strings

    Yep, with regular expressions.
    Does the data contain just a letters or string of letters?
    regards pike

    If the solution helped please donate
    here to the RSPCA

    Sites worth visiting;

    J&R Solutions - royUK

    AJP Excel Information - Andy Pope

    Spreadsheet Toolbox

    JBeaucaires Excel Files

    VBA for smarties - snb

  6. #6
    Registered User
    Join Date
    01-08-2010
    Location
    nj
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Advanced filter for <> several text strings

    each symbol is a string of one to four letters, for example

    A
    AB
    ABC
    ABCD

    all of those above would be possible value of a symbol.

    I dont know anything about regular expressions....is this something that is difficult to implement?
    Last edited by ilscfn; 01-08-2010 at 05:46 PM.

  7. #7
    Forum Moderator pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2010
    Posts
    5,141

    Re: Advanced filter for <> several text strings

    Let me get this right
    data
    a
    ab
    cba
    dcd

    filter for <> ab, which means if the string contains any a or b hide the row
    the result would be dcd as it doesnt contain a or b?
    regards pike

    If the solution helped please donate
    here to the RSPCA

    Sites worth visiting;

    J&R Solutions - royUK

    AJP Excel Information - Andy Pope

    Spreadsheet Toolbox

    JBeaucaires Excel Files

    VBA for smarties - snb

  8. #8
    Registered User
    Join Date
    01-08-2010
    Location
    nj
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Advanced filter for <> several text strings

    No, instead i would like to filter for exact matches, so

    <>a, ab, cba


    the result of which would be dcd, because it was the only one i didnt filter out.

    or even better, have a list of filtered for symbols, like

    Filteredsymbols
    a
    ab
    cba

    that the filter would reference, and result dcd.

  9. #9
    Forum Moderator pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2010
    Posts
    5,141

    Re: Advanced filter for <> several text strings

    arrr.... I have a look to night as I'm off to the beach
    regards pike

    If the solution helped please donate
    here to the RSPCA

    Sites worth visiting;

    J&R Solutions - royUK

    AJP Excel Information - Andy Pope

    Spreadsheet Toolbox

    JBeaucaires Excel Files

    VBA for smarties - snb

  10. #10
    Forum Guru martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    10,477

    Re: Advanced filter for <> several text strings

    you need them in the same row
    so if your column to filter is col a ,a1 header is "list" sheet is sheet 1
    then say in d1 and e1 put the same header ie list
    then in d2 put ="<>ab" and e2 put ="<>ac" (including the "=")
    filter col a criteria range is sheet1!$d$1:$e$2
    you could also just refer to other cells containing those values so say h1 has ab and h2 ac
    then in d2 put ="<>"&h1 in e2 put ="<>"&h2
    Last edited by martindwilson; 01-08-2010 at 06:58 PM.
    Mojito connoisseur and a dabbler in Cisco
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  11. #11
    Forum Moderator pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2010
    Posts
    5,141

    Re: Advanced filter for <> several text strings

    ilscfn
    What is theworksheet setup/layout?
    Its not going to be as quick as the filter but you could just use the .find
    regards pike

    If the solution helped please donate
    here to the RSPCA

    Sites worth visiting;

    J&R Solutions - royUK

    AJP Excel Information - Andy Pope

    Spreadsheet Toolbox

    JBeaucaires Excel Files

    VBA for smarties - snb

  12. #12
    Forum Guru martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    10,477

    Re: Advanced filter for <> several text strings

    see attached its a bit more dynamic you can simple extend the formulas across and the alter the criteria range to match
    Attached Files Attached Files
    Mojito connoisseur and a dabbler in Cisco
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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.2.0