+ Reply to Thread
Results 1 to 4 of 4

Possible to search for a substring withing a string of text which is an exact match?

  1. #1
    Registered User
    Join Date
    08-22-2013
    Location
    Chennai
    MS-Off Ver
    Excel 2007
    Posts
    17

    Possible to search for a substring withing a string of text which is an exact match?

    Hi All

    I have a small doubt.

    Let us say I have the following text in Cell A1. "There is a fault in the cal cycle.Need to update the records."
    And in cell A2 I have the following text. "Called for backup assistance. There is an issue with numbers."
    I cells B1 & B2 I need a particular formula which searches for the substring "cal" exactly and returns true if present. In cell A1, we have "cal" in the text. So it should return true for me in cell B1.

    However in cell B2 I need false to be returned even though I have "Called" inside the text. I need true to be shown only for those cells where we have the exact text "cal" and no text characters in front or back of it.

    Is there any solution to this?

    Thanks in advance!

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,156

    Re: Possible to search for a substring withing a string of text which is an exact match?

    hi Urugmo. try:
    =ISNUMBER(SEARCH(" cal "," "&A1&" "))

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: Possible to search for a substring withing a string of text which is an exact match?

    include spaces around the text.

    =ISNUMBER(FIND(" cal ",A1))

    If cal can appear as the first or last word you will need to include spaces as in benishiryo's example
    Last edited by Andy Pope; 01-06-2014 at 04:38 AM.
    Cheers
    Andy
    www.andypope.info

  4. #4
    Registered User
    Join Date
    08-22-2013
    Location
    Chennai
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Possible to search for a substring withing a string of text which is an exact match?

    Thanks guys. Solved!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Search string for substring...return match
    By Gambinus in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-21-2012, 03:18 PM
  2. [SOLVED] Find Exact Match Text String Using Formula
    By sweetrevelation in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-12-2012, 10:53 AM
  3. Search for Substring within a String using loop
    By Hallet in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-09-2012, 01:31 PM
  4. Replies: 4
    Last Post: 04-02-2012, 07:37 AM
  5. search a string withing a string : find / search hangs
    By itarnak in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-24-2005, 11:05 AM

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