+ Reply to Thread
Results 1 to 6 of 6

Find a specific sentence in a cell full of text

  1. #1
    Registered User
    Join Date
    04-28-2009
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    3

    Find a specific sentence in a cell full of text

    Hi,

    Very new here and very new to excel formulas.

    Could you tell me how I can find a specific sentence within a cell that contains many sentences.

    for example

    I want to find, "I am new." within a text that contains, "Hello I am Bob. I am new. I live in england."

    I am currently using =+FIND(AB$1,$V2) where AB1 contains the sentence I am looking for and V2 contains the cell full of sentences. However this returns #VALUE! when the sentence is not found. I want it to return null.

    thanks in advance.

    Ben
    Last edited by BClark86; 04-28-2009 at 01:49 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Find a specific sentence in a cell full of text

    FIND is case-sensitive.. case-insensitive function equiv. is SEARCH ... try that...

    and match has to be exact... not extra spaces within either string...

    you also don't need the + sign in Excel after the = sign.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    04-28-2009
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Find a specific sentence in a cell full of text

    Hi,

    Thanks for a very quick reply!

    I've just tried SEARCH and it brings up the same problem.

    When it finds the sentence within the text cell it returns the Starting Position of that string, however, if it is unable to find the sentence then it still returns #VALUE!. I need it to return null or 0.

    thank you again,

    Ben

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Find a specific sentence in a cell full of text

    Oh, I misread your initial question... thought the function wasn't working for you when it should have found the string.

    Try:

    =IF(ISNUMBER(FIND(AB$1,$V2)),FIND(AB$1,$V2),0)

  5. #5
    Registered User
    Join Date
    04-28-2009
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Find a specific sentence in a cell full of text

    Thank you very much!

    Thats worked perfectly!!

    Brilliant!

    cheers

    Ben

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Find a specific sentence in a cell full of text

    If you are satisfied with the solution provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ 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