Results 1 to 3 of 3

Return words before and after a keyword in excel

Threaded View

  1. #1
    Registered User
    Join Date
    01-09-2013
    Location
    Perth
    MS-Off Ver
    Excel 2010
    Posts
    3

    Return words before and after a keyword in excel

    Hi Everyone,

    I'm working on statistics for my local baseball team, and I would like to be able to output words before and after a key word in excel.

    When given data from each game, I get the following string as an example:

    Pitching Change: Paul McCartney replaces John Lennon.

    I would like to extract the players names ie. The first two words before the word "replaces" and the first two words after the word "replaces".

    So my desired return will be "Paul McCartney" in one cell and "John Lennon" in another.

    NOTE:
    - I tried a formula that returns the 3rd, 4th, 6th and 7th words but it does not work as sometimes players have three or four words in their names and this messes me up. This is why I need it based around the keyword "replaces". I hope this makes sense, I've tried to explain it better in the attached sheet!
    - If possible, I need the fullstop removed from the results. ie I would like "John Lennon" returned instead of "John Lennon."

    Thanks in advance
    Tom

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