+ Reply to Thread
Results 1 to 5 of 5

Extracting words after and before a spesific word

  1. #1
    Registered User
    Join Date
    11-24-2009
    Location
    OSLO
    MS-Off Ver
    Excel 2003
    Posts
    66

    Extracting words after and before a spesific word

    Hi!

    I want to extract 2 words after is in the folowing string:
    My name is John Bon and I don`t want to stay - return John Bon

    I want to extract every characters before "is" (include is) in the following string
    My name is John Bon and I don`t want to stay - My name is

    In some of my rows there is no "is", and I don`t want the crazy symbol, so I need to use "iserror"

    Can you help?

  2. #2
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: Extracting words after and before a spesific word

    Hi try this formula for first case
    right(A1,len(A1)-find("is",A1,1)-2)
    for the rest better send the sample with expect results
    Regards

    tom1977

    If You are satisfied with my solution click the small star icon on the left to say thanks.

  3. #3
    Registered User
    Join Date
    11-24-2009
    Location
    OSLO
    MS-Off Ver
    Excel 2003
    Posts
    66

    Re: Extracting words after and before a spesific word

    Her is a sample file
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: Extracting words after and before a spesific word

    Hi look into attachment formula is huge but works (maybe someone else can create simpler one)
    Attached Files Attached Files

  5. #5
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: Extracting words after and before a spesific word

    In B2,

    Please Login or Register  to view this content.
    C2,

    Please Login or Register  to view this content.
    then copy down.
    Last edited by Haseeb Avarakkan; 04-12-2012 at 04:12 AM. Reason: Replace IFERROR in 2nd formula
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

+ 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