+ Reply to Thread
Results 1 to 5 of 5

how to extract last word from a string of more than two words also when string ending with

  1. #1
    Registered User
    Join Date
    10-21-2016
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    4

    how to extract last word from a string of more than two words also when string ending with

    Hello all

    Could you please help me to make a formula to extract last word from a string of more than two words also when string is ending with a space as well.

    COLLAR COLLAR BELT COAT COAT
    COLLAR COLLAR BELT DRESS DRESS
    COLLAR COLLAR COAT
    COLLAR COLLAR COAT COAT

    I would like to extract last word but they all are ending with space.


    Thank you

  2. #2
    Valued Forum Contributor
    Join Date
    08-04-2011
    Location
    UK
    MS-Off Ver
    Excel 2021
    Posts
    346

    Re: how to extract last word from a string of more than two words also when string ending

    try this

    =TRIM(RIGHT(SUBSTITUTE(TRIM(A1)," ",REPT(" ",500)),500))

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: how to extract last word from a string of more than two words also when string ending

    Here's another one...

    =TRIM(RIGHT(SUBSTITUTE(A1," ",REPT(" ",50)),75))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Registered User
    Join Date
    10-21-2016
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: how to extract last word from a string of more than two words also when string ending

    Thank you so much guys

    the both formulas work perfectly

    kind regards

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: how to extract last word from a string of more than two words also when string ending

    You're welcome. Thanks for the feedback!

+ 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 5th string onwards but exclude 6th string onwards if found a specificlist of words
    By suchetherrah in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 03-07-2016, 03:48 AM
  2. [SOLVED] Extract all the words from a string for processing, while leaving string intact.
    By staggers47 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 10-10-2014, 02:02 PM
  3. Extract Last Two Words of a string
    By VIJEXCEL in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 12-30-2013, 10:40 AM
  4. Extract n words from string
    By holmes123 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-07-2012, 10:29 PM
  5. Extract a string of text between certain words
    By delboy2405 in forum Excel General
    Replies: 3
    Last Post: 01-17-2012, 12:40 AM
  6. UDF to extract first three words from string
    By stodge in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-24-2011, 07:25 AM
  7. Extract last two words from string
    By dimid in forum Excel General
    Replies: 5
    Last Post: 11-28-2008, 11:07 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