+ Reply to Thread
Results 1 to 8 of 8

Formula to Find a specific text within a text string

Hybrid View

  1. #1
    Registered User
    Join Date
    08-31-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    87

    Formula to Find a specific text within a text string

    Hi,

    I need a formula to find a specific text within a text string.

    e.g.:

    "Sales Account Representative Europe" in cell A1

    I want to build a formula in cell A2 that would return "Sales" in that text string above

    Thanks

  2. #2
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Formula to Find a specific text within a text string

    =left(a1,5)
    Gary's Student

  3. #3
    Registered User
    Join Date
    08-31-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    87

    Re: Formula to Find a specific text within a text string

    the "sales" can be anywhere in the text string. it could be in the middle, first, or last...

  4. #4
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Formula to Find a specific text within a text string

    O.K. then.

    If A1 contains the full string and B1 contains "Sales"

    then the formula:

    =FIND(B1,A1) will tell you where in A1, B1 can be found. For example if A1 contains:
    hfshfjssalesvcjvh
    the formula will return 8

    Is this what you need???

  5. #5
    Registered User
    Join Date
    08-31-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    87

    Re: Formula to Find a specific text within a text string

    no, i dont need "8". i need "Sales"

  6. #6
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Formula to Find a specific text within a text string

    in addition on the reaction of Jacobshavn in #4.

    =if(FIND(B1,A1)>0,"sales","there is no sales in this cell")
    Last edited by oeldere; 09-13-2012 at 01:41 PM. Reason: adition changed in addition
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

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

    Re: Formula to Find a specific text within a text string

    perhaps like this..

    =IF(ISNUMBER(SEARCH("Sales",A1)),"Sales","")
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  8. #8
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Formula to Find a specific text within a text string

    Then use:

    =IF(ISERROR(FIND(B1,A1)),"",B1) with the big string in A1 and "Sales" in B1

    If "Sales" is found in A1, then "sales" is displayed.
    If "Sales is not found in A1, then nothing is displayed.

+ 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