+ Reply to Thread
Results 1 to 6 of 6

extract everything but first and last word

  1. #1
    Registered User
    Join Date
    07-01-2015
    Location
    United States
    MS-Off Ver
    Microsoft office standard 2007
    Posts
    52

    extract everything but first and last word

    I want a formula that will extract everything in a cell that is not the first or the last word...

    In this case the

    first "word" is always a date formatted like this ---> XX/XX/XX

    last word is always a number

    I just want to have everything in between pulled out and put into a adjacent cell.
    Last edited by jeck876; 08-05-2015 at 12:35 PM.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: extract everything but first and last word

    Hi,

    One way

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: extract everything but first and last word

    Maybe this

    in B1 and pull formula to the right until you see blanks

    =IF(ISERROR(--TRIM(MID(SUBSTITUTE($A1," ",REPT(" ",255)),255*COLUMNS($A:A),255))),TRIM(MID(SUBSTITUTE($A1," ",REPT(" ",255)),255*COLUMNS($A:A),255)),"")

    Row\Col
    A
    B
    C
    D
    E
    F
    G
    1
    8/4/2015 last word is always a number 654987 last word is always a number
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: extract everything but first and last word

    ..or if there are several words then

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  5. #5
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: extract everything but first and last word

    Or if you would like it to go into one cell use formula below

    =MID(A1,FIND(" ",A1)+1,LOOKUP(10^308,FIND(" ",A1,ROW(INDIRECT("1:"&LEN($A1))))-1)-FIND(" ",A1))

    Row\Col
    A
    B
    1
    8/4/2015 last word is always a number 654987 last word is always a number
    2
    12/29/2014 just another text string 456665 just another text string
    Last edited by AlKey; 08-05-2015 at 10:59 AM.

  6. #6
    Registered User
    Join Date
    07-01-2015
    Location
    United States
    MS-Off Ver
    Microsoft office standard 2007
    Posts
    52

    Re: extract everything but first and last word

    this is what i was looking for

    thanks!!

+ 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. Extract last word
    By blackcat in forum Excel General
    Replies: 2
    Last Post: 03-07-2015, 11:26 AM
  2. Extract last word from a string and next to last word and so on.
    By ejbeckwith in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-14-2013, 08:51 AM
  3. Search for a word in a column and extract the word
    By Abishekar in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-17-2012, 09:30 AM
  4. [SOLVED] Extract last word
    By Aland2929 in forum Excel General
    Replies: 2
    Last Post: 03-24-2012, 07:34 AM
  5. Extract the last word from the cell
    By senjuti.sarkar in forum Excel General
    Replies: 8
    Last Post: 02-10-2012, 05:17 AM
  6. Extract from particular word to end
    By DeepakS in forum Excel General
    Replies: 5
    Last Post: 08-22-2011, 10:41 AM
  7. Extract a text from word and place it en excel or word?
    By Elegidos in forum Word Programming / VBA / Macros
    Replies: 1
    Last Post: 12-09-2009, 06:14 AM
  8. [SOLVED] Extract Key word
    By Tempy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-01-2005, 12:05 PM

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