+ Reply to Thread
Results 1 to 7 of 7

Find Text In Range With Part Of Text & Return True or False

  1. #1
    Registered User
    Join Date
    06-26-2013
    Location
    Hong Kong
    MS-Off Ver
    Excel 2003
    Posts
    3

    Red face Find Text In Range With Part Of Text & Return True or False

    Hi,

    The example is:

    Column A are some categories for reference, column C are the sentences. I would like to have a check in column D that if the sentences contain the categories of food.

    But i have no idea to have the formula use for finding text in a range of cells... Can this work in Excel Formula?

    THANKSTesting.xlsxTesting.xlsx
    Last edited by tis28; 06-30-2013 at 09:37 PM. Reason: Fixed

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Find Text In Range With Part Of Text & Return True or False

    Try this:

    =IF(SEARCH(TEXT(A2,"@"),C2)>0,"YES","NO")

  3. #3
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Find Text In Range With Part Of Text & Return True or False

    =IF(ISNUMBER(SEARCH(A2,C2)),"Yes","No")
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  4. #4
    Valued Forum Contributor
    Join Date
    10-10-2012
    Location
    New York
    MS-Off Ver
    Excel 2007/2010
    Posts
    337

    Re: Find Text In Range With Part Of Text & Return True or False

    try this
    =IF(FIND(A2,C2,1)>0,"Yes","No")
    Don't just use the answers provided for you. Try to understand how it works by reverse engineering or asking about it.

    Please mark the thread as [SOLVED] (Thread Tools->Mark thread as Solved) when answered.
    If you're happy with an answer given, please click the * under the person's name to boost their reputation.

  5. #5
    Registered User
    Join Date
    06-26-2013
    Location
    Hong Kong
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Find Text In Range With Part Of Text & Return True or False

    Thanks for everyone's answer.

    Sorry that I made some unclear information. All the formular I use for the first sentence is work, but it will have some problem when trying the second one. Also if there is a third sentence is "I love strawberry.", it cannot specify the "strawberry" in sentence & cannot return "Yes". Any formular can do for this case?

    Thanks for help!

  6. #6
    Valued Forum Contributor
    Join Date
    10-10-2012
    Location
    New York
    MS-Off Ver
    Excel 2007/2010
    Posts
    337

    Re: Find Text In Range With Part Of Text & Return True or False

    I guess we all dropped the ball on that one, you just need to wrap an iferror() function around our solutions.
    =IFERROR(IF(FIND(A2,C2,1)>0,"Yes"),"No")
    -or-
    =IFERROR(IF(ISNUMBER(SEARCH(A2,C2)),"Yes"),"No")
    -or-
    =IFERROR(IF(SEARCH(TEXT(A2,"@"),C2)>0,"YES"),"NO")

  7. #7
    Registered User
    Join Date
    06-26-2013
    Location
    Hong Kong
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Find Text In Range With Part Of Text & Return True or False

    Hey guys, i do some amendment & it's work now, THANKS all~!

+ 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