+ Reply to Thread
Results 1 to 7 of 7

Find and remove all text to the left of last comma (including comma) in a cell

  1. #1
    Registered User
    Join Date
    09-21-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    17

    Find and remove all text to the left of last comma (including comma) in a cell

    Hi Guys,

    I need help in removing all text to the left of last comma (including comma) in a cell. I have a column in a spreadsheet with text separated by either one or multiple commas. I need to remove all the text untill the last comma in the cell.

    Below is the example:

    From "text1, text2, text3, text4" in a cell To just "text4".

    Can someone help me with this.

    Let me know if any additional information is required.


    Best Regards

  2. #2
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Find and remove all text to the left of last comma (including comma) in a cell

    Hi Excelrookie_1,
    maybe something like this
    Please Login or Register  to view this content.

  3. #3
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Find and remove all text to the left of last comma (including comma) in a cell

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


    Or to remove the text after and including, the last comma
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  4. #4
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Find and remove all text to the left of last comma (including comma) in a cell

    or ctrl+h
    Find: *,
    Replace:
    replace All
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  5. #5
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Find and remove all text to the left of last comma (including comma) in a cell

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

  6. #6
    Registered User
    Join Date
    09-21-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Find and remove all text to the left of last comma (including comma) in a cell

    Hi Nilem,

    I'm getting Compile error: Expected array in line 6 of the above code

    x(i, 1) = Trim(sp(UBound(sp)))

    Please help

  7. #7
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Find and remove all text to the left of last comma (including comma) in a cell

    try to change this:
    Please Login or Register  to view this content.

+ Reply to Thread

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