+ Reply to Thread
Results 1 to 5 of 5

EXtract First Two Words

  1. #1
    Registered User
    Join Date
    10-19-2012
    Location
    York
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    59

    EXtract First Two Words

    Hi

    I need a formula to extract the first two words from a text string,

    i have been using =LEFT(B5,FIND(" ",B5)-1) to previously extract the first word (word before the first space), but not sure how to extend this to get the first two words extracted.


    Any ideas!!

    thanks

  2. #2
    Valued Forum Contributor
    Join Date
    01-19-2012
    Location
    Barrington, IL
    MS-Off Ver
    Excel 2007/2010
    Posts
    1,211

    Re: EXtract First Two Words

    Er...try this one...I feel like I made it too long but hey it works.

    =TRIM(LEFT(B5,FIND(" ",B5))&MID(B5,FIND(" ",B5),FIND(" ",B5,FIND(" ",B5)+1)-FIND(" ",B5)))

    Last edited by Speshul; 08-13-2014 at 11:39 AM.
    You should hit F5, because chances are I've edited this post at least 5 times.
    Example of Array Formulas
    Quote Originally Posted by Jacc View Post
    Sorry, your description makes no sense. I just made some formula that looks interesting cause I had nothing else to do.
    Click the * below on any post that helped you.

  3. #3
    Valued Forum Contributor TheCman81's Avatar
    Join Date
    11-06-2012
    Location
    Edinburgh, UK
    MS-Off Ver
    Excel 2003, 2007, 2010, 2013
    Posts
    346

    Re: EXtract First Two Words

    Something like this will do the trick

    =TRIM(LEFT(SUBSTITUTE(A2," ",REPT(" ",99)),200))

    or even smaller

    =LEFT(A2,FIND(" ",A2,FIND(" ",A2)+1))
    Last edited by TheCman81; 08-13-2014 at 11:42 AM.
    Excel Guru in the making

    <----------If the question has been answered to your satisfication please click the Add Repuation star to the left

  4. #4
    Valued Forum Contributor
    Join Date
    01-19-2012
    Location
    Barrington, IL
    MS-Off Ver
    Excel 2007/2010
    Posts
    1,211

    Re: EXtract First Two Words

    That's what I get for using like 4 helper cells to build the formula, haha.

    1 Find first space
    2 Find second space
    3 What's the difference in the spaces
    4 how long is second word
    5 Combine!
    6 Long formula for no reason
    Last edited by Speshul; 08-13-2014 at 11:48 AM.

  5. #5
    Registered User
    Join Date
    10-19-2012
    Location
    York
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    59

    Re: EXtract First Two Words

    Hi

    Thanks Speshal that worked a trick

    I'll give the other two ago as well as they do look neater!

    thanks All

+ 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. [SOLVED] extract last 2 words of cell
    By kosherboy in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-26-2014, 04:09 PM
  2. Replies: 7
    Last Post: 02-25-2014, 02:00 AM
  3. match words and extract out
    By mathanraj76 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-29-2013, 02:15 PM
  4. [SOLVED] looking formula for Extract Specific WORDs in existing LONG Words
    By santosh226001 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-07-2013, 08:21 AM
  5. Extract all but last two words
    By rwl518p in forum Excel General
    Replies: 2
    Last Post: 12-12-2011, 10:06 AM

Tags for this Thread

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