+ Reply to Thread
Results 1 to 6 of 6

Search for multiple strings simultaneously

  1. #1
    Registered User
    Join Date
    03-08-2011
    Location
    Denver CO
    MS-Off Ver
    Excel 2007
    Posts
    3

    Search for multiple strings simultaneously

    Anyone help me with this one?

    I'm using the following formula to look in Column N and indicate TRUE if the string "at home" is any place in the column. Then I sort the column and parse out the TRUE records.

    =ISNUMBER(SEARCH("at home",N2))

    What I would like to do is be able to look for several strings at one time and have the formula indicate TRUE or FALSE if any one or more of the strings are present. (FALSE to display if none of the strings are present.)

    Example: "at home" "from home" "home based" "opportunity"

    What I'm doing is extracting ads from online directories, and then parsing out the ones that are related to working from home. There may be a few hundred words in the listing. I want have the formula check all the text and indicate TRUE if any of the chosen words or phrases are present.

    I can put the formula in several columns and then sort each column. That's a PIA though. Doing all at one time would be much better.

    Thanks

    Dale
    Last edited by DonkeyOte; 03-08-2011 at 03:52 AM.

  2. #2
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: Excel Formula Question / Help

    Hi, you could write a list of the strings you're searching (in the example $D$2:$D$4) and try:


    =ISNUMBER(MATCH(1,SEARCH("*"&$D$2:$D$4&"*",B2)))
    to be confirmed with control+shift+enter: it's an array formula.

    Hope it helps.

    Regards
    Attached Files Attached Files
    Last edited by canapone; 03-08-2011 at 03:05 AM. Reason: Grammar

  3. #3
    Registered User
    Join Date
    03-08-2011
    Location
    Denver CO
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Excel Formula Question / Help

    I don't understand....

    Is there a way to accompolish what I want using the actual strings within quites like the original formula I used within this help request? I have tried a few and failed, leading me here for help.

    Thanks

  4. #4
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: Excel Formula Question / Help

    Hi, maybe

    =ISNUMBER(MATCH(1,SEARCH("*"&{"from home","opportunity","at home";"sales"}&"*",B2)))
    To be confirmed with enter.

    I've suggested an external list to match, because it seemed to me more convenient if you have many strings to control.

    Regards
    Attached Files Attached Files
    Last edited by canapone; 03-08-2011 at 03:53 AM. Reason: New attachment (example)

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Search for multiple strings simultaneously

    Dale, welcome to the board though please note your original thread title fell foul of Forum Rules.

    In short your thread titles should accurately and concisely describe your problem whilst using terms appropriate to a Google search.

    Given this was your first post I have on this occasion modified on your behalf, however, I would ask that going forward you ensure all posts adhere to the aforementioned rules.

  6. #6
    Registered User
    Join Date
    03-08-2011
    Location
    Denver CO
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Search for multiple strings simultaneously

    Thanks... That works. I removed the ; and replaced with a , as it errored. Then I saw the typo.

    I appreciate your quick response and solution.

    Dale

+ Reply to Thread

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.6.0 RC 1