+ Reply to Thread
Results 1 to 5 of 5

How to use LEFT and RIGHT to delete last character

  1. #1
    Registered User
    Join Date
    06-01-2014
    Posts
    27

    How to use LEFT and RIGHT to delete last character

    Hi,

    If have a lot of names in excel with a space at the end. The space is causing errors in other formula cells.
    Is there a way to use formulas to copy the name but delete the last space?
    My data is like this

    "" illustrate text in my cells.
    "James Johnson "
    "Adam Emil "

    I want it like this
    "James Johnson"
    "Adam Emil"


    So i just want to get rid of that last space.

  2. #2
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: How to use LEFT and RIGHT to delete last character

    Use
    Trim function
    =Trim("James Johnson ")
    or
    =left("James Johnson ",len("James Johnson ")-1)
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  3. #3
    Registered User
    Join Date
    06-01-2014
    Posts
    27

    Re: How to use LEFT and RIGHT to delete last character

    Awesome, thanks a lot!

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: How to use LEFT and RIGHT to delete last character

    OR
    =REPLACE(B1,LEN(B1),1,)
    This will remove the last character no matter what it is.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  5. #5
    Forum Contributor
    Join Date
    09-17-2014
    Location
    UK
    MS-Off Ver
    2007
    Posts
    117

    Re: How to use LEFT and RIGHT to delete last character

    Would it be easier to use the find & replace (ctrl+f) function in excel?

    Select the column/row/range of cells and the use find <space>" and replace all with just "

+ 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 text to left of nth character
    By cmb80 in forum Excel General
    Replies: 3
    Last Post: 06-16-2014, 11:09 AM
  2. [SOLVED] Extract text left and right of character
    By stuartm4h in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-12-2013, 07:32 AM
  3. Replies: 3
    Last Post: 11-20-2012, 10:03 PM
  4. Macro to find character and delete all text in cell after the character
    By SpencerRichman in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-01-2012, 06:08 PM
  5. Replies: 2
    Last Post: 08-19-2008, 07:18 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