+ Reply to Thread
Results 1 to 4 of 4

Match specific words in cell and return value if true or false

  1. #1
    Registered User
    Join Date
    03-27-2012
    Location
    Cedar Falls
    MS-Off Ver
    Excel 2010
    Posts
    2

    Match specific words in cell and return value if true or false

    I need a formula that will identify 3 word in a cell that are separated among other words to return a specific value.

    Example: The quick brown fox jumps over the lazy dog.

    I need a formula that will find quick, fox and over and return the text value "Oh my gosh!"

    I have tried if( count (search and can get it to find quick, fox and over, but some cells will have just quick and other fox and over, so I am getting positive returns on any cell that contains any one, two, or three of those words.

    I need it to return only the cells that contain all 3 of those words.

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,677

    Re: Match specific words in cell and return value if true or false

    Well, if all 3 are there the count will be 3 so try

    =IF(COUNT(SEARCH({"quick","fox","over"},A1))=3,"Oh my gosh!","D'oh!")
    Last edited by Paul; 03-27-2012 at 04:15 PM.
    Audere est facere

  3. #3
    Registered User
    Join Date
    03-27-2012
    Location
    Cedar Falls
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Match specific words in cell and return value if true or false

    DOH! Thank you!!!!
    Last edited by Paul; 03-27-2012 at 04:15 PM.

  4. #4
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887

    Re: Match specific words in cell and return value if true or false

    Hi JBrooksia, welcome to the forum.

    I've adjusted your thread title to something that is actually descriptive of your issue, per forum rule #1. Please take a moment to read them (link in my signature) and in the future create similarly descriptive titles.

    Thanks!

+ 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