+ Reply to Thread
Results 1 to 11 of 11

Extract text 2 last string

  1. #1
    Forum Contributor
    Join Date
    01-22-2013
    Location
    Pekanbaru, Indonesia
    MS-Off Ver
    Excel 2013 & Google Sheet
    Posts
    1,146

    Extract text 2 last string

    hi all,

    i need someone could help me, how to extract string 2 last string, further detail check this below ;

    description-------------------------------------desired result------
    Our nation's immigration system is broken---------is broken---------
    Legal immigration should be simple and efficient----and efficient-------
    The President’s proposal is designed----------------is designed--------

    with excel formula how to figure it out? do not vba...

    thanks in advance.......

    john m

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Extract text 2 last string

    Hi,

    =TRIM(RIGHT(SUBSTITUTE(A1," ",REPT(" ",255)),510))

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  3. #3
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,371

    Re: Extract text 2 last string

    Maybe:
    =MID(A1;FIND("*";SUBSTITUTE(A1;" ";"*";LEN(A1)-LEN(SUBSTITUTE(A1;" ";""))-1))+1;255)

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

    Re: Extract text 2 last string

    Try this...

    Data Range
    A
    B
    1
    description
    desired result
    2
    Our nation's immigration system is broken
    is broken
    3
    Legal immigration should be simple and efficient
    and efficient
    4
    The President’s proposal is designed
    is designed


    This formula entered in B2 and copied down:

    =MID(" "&A2,FIND("^",SUBSTITUTE(" "&A2," ","^",LEN(" "&A2)
    -LEN(SUBSTITUTE(" "&A2," ",""))-1))+1,255)

    There must be at least 2 words in the cell or you'll get an error.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Valued Forum Contributor
    Join Date
    07-04-2012
    Location
    Cape Town, RSA
    MS-Off Ver
    Office 365 ProPlus
    Posts
    1,050

    Re: Extract text 2 last string

    Hi,

    If your list starts in cell A1, then enter this formula into cell B1

    =IFERROR(RIGHT(A1,LEN(A1)-FIND(CHAR(8),SUBSTITUTE(A1," ",CHAR(8),(LEN(A1)-LEN(SUBSTITUTE(A1," ",""))-1)))),A1)
    Regards,
    Rudi

  6. #6
    Forum Contributor
    Join Date
    01-22-2013
    Location
    Pekanbaru, Indonesia
    MS-Off Ver
    Excel 2013 & Google Sheet
    Posts
    1,146

    Re: Extract text 2 last string

    hi guys, awesome answer...

    many thanks...)

  7. #7
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Extract text 2 last string

    One more still to come.......
    You may also try this........

    Please Login or Register  to view this content.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  8. #8
    Forum Contributor
    Join Date
    01-22-2013
    Location
    Pekanbaru, Indonesia
    MS-Off Ver
    Excel 2013 & Google Sheet
    Posts
    1,146

    Re: Extract text 2 last string

    hi sktneer, thanks for your reply...
    it's worked too...

  9. #9
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Extract text 2 last string

    Glad to know that. Thanks for the feedback.

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

    Re: Extract text 2 last string

    You're welcome. We appreciate the feedback!

    If I had to pick a favorite it would be from XOR in post #2.

  11. #11
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Extract text 2 last string

    Quote Originally Posted by Tony Valko View Post
    You're welcome. We appreciate the feedback!

    If I had to pick a favorite it would be from XOR in post #2.
    Cheers!

+ 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] Find and extract text string from within another text string
    By huy_le in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-12-2013, 03:22 PM
  2. Find and extract text string from within another text string
    By huy_le in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-09-2013, 09:01 PM
  3. [SOLVED] How to Extract A Number from String if Text within the String Equals XYZ
    By tyrsfury in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 11-15-2012, 03:30 PM
  4. [SOLVED] extract text string when you only know the last three letters of that string
    By alison0edwards in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-12-2012, 01:20 PM
  5. Extract small string of text from larger string
    By mark_jam3s in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-23-2010, 05:36 AM

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