+ Reply to Thread
Results 1 to 9 of 9

Search for a row containing

  1. #1
    Registered User
    Join Date
    11-28-2011
    Location
    Budapest
    MS-Off Ver
    Excel 2007
    Posts
    5

    Unhappy Search for a row containing

    Hi. This is my first post here. Hope i`m in the correct section.

    I have a list of words and i want to filter it to show just the rows that are containing the words i want. so here`s an example of my list:

    column "A"

    stress
    this is a stressful situation
    are you stressless
    destress
    antistress remedy
    good antistress remedy


    Now, i want in column "B" to show the columns that contains the word that start with STRESS, and to filter out words like "antistress", "destress", but leave the columns that have "stressless", "stressful".

    In other words, if a word in the column start with "stress" is GOOD, but if a word in the column have some characters before the "STRESS" word then is BAD.

    I tried using IF ISNUMBER, but i don`t know how to deal with it.

    Please Login or Register  to view this content.
    So in the B1 i enter STRESS.... but how do tell it that when is stressful is OK, but when is antistress is not ok?


    thanks

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,753

    Re: Search for a row containing

    Why not just use Autofilter with "begins with".


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    11-28-2011
    Location
    Budapest
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Search for a row containing

    hi,

    i want to set a special filter criteria, i want that in the column B to enter the words i want to INCLUDE and in the column C the words to exclude. I want to be able to filter my list better than with autofilter.

  4. #4
    Registered User
    Join Date
    11-28-2011
    Location
    Budapest
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Search for a row containing

    i`m thinking of something like
    but i don`t know how to apply it

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,753

    Re: Search for a row containing

    The example you quote uses the formula:

    =IF(SUM(COUNTIF(A1,{"*MDF*","*PB*","*PART*"}))>0,"Machine1","Machine2")

    That would be equivalent to "contains" but looking for MDF, PB or PART.

    My understanding is/was that you wanted to find words at the begininning of the string. In which case, I don't see how this would work for you.

    Regards, TMS

  6. #6
    Registered User
    Join Date
    11-28-2011
    Location
    Budapest
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Search for a row containing

    please guys help me out...

    i have this formula

    Please Login or Register  to view this content.
    Could you please tell me how do i replace the CRITERIA
    Please Login or Register  to view this content.
    with values from G1, G2 and G3?


    thanks

  7. #7
    Registered User
    Join Date
    11-28-2011
    Location
    Budapest
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Search for a row containing

    I want to modify it so it will search for values from some CELLs i want. Instead of MDF, PB or PART, i want to tell it to look in G1, G2, G3.

    Now... in those G1 i want to tell it to look for value like stress* -> meaning stress PLUS other characters after it....

    Do you have any idea?


    Quote Originally Posted by TMShucks View Post
    The example you quote uses the formula:

    =IF(SUM(COUNTIF(A1,{"*MDF*","*PB*","*PART*"}))>0,"Machine1","Machine2")

    That would be equivalent to "contains" but looking for MDF, PB or PART.

    My understanding is/was that you wanted to find words at the begininning of the string. In which case, I don't see how this would work for you.

    Regards, TMS

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,753

    Re: Search for a row containing

    You know what you want. Try it. I don't think it will work because you want the cells to start with the word you are looking for.

    Regards, TMS

  9. #9
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Search for a row containing

    Hi

    I give you, one other solution, using, SEARCH & IF functions, with a helper column.

    Hopes to be OK for you

    Regards.
    Attached Files Attached Files
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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