+ Reply to Thread
Results 1 to 6 of 6

Need separate codes to remove first and last character from cells

  1. #1
    Forum Contributor
    Join Date
    05-03-2013
    Location
    Costa Rica
    MS-Off Ver
    MS Excel 365
    Posts
    141

    Need separate codes to remove first and last character from cells

    hi there!

    I have this code to enter a character I want on each cell from a range right in the beginning of cells:
    (This case has been set up to show a "{")
    Please Login or Register  to view this content.
    And this other code to enter a character at the end:
    (This case has been set up to show a "}")
    Please Login or Register  to view this content.
    Now I'd like to have 2 codes, one to remove the character from the beginning, and another one to remove it from the end of cells. Somebody help me, please!!

  2. #2
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Need separate codes to remove first and last character from cells

    Perhaps:

    Please Login or Register  to view this content.
    Gary's Student

  3. #3
    Forum Contributor
    Join Date
    05-03-2013
    Location
    Costa Rica
    MS-Off Ver
    MS Excel 365
    Posts
    141

    Re: Need separate codes to remove first and last character from cells

    hello Jakobshavn!

    Thanks for your help. Your first code worked perfectly, but the second did not (the one for deleting character on the right). It is doing the same as the first code. Could you please help me fix it?

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

    Re: Need separate codes to remove first and last character from cells

    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,692

    Re: Need separate codes to remove first and last character from cells

    What happens if you change "Right" to "Left" in the 2nd macro from Jakobshavn?

    nilem was just a little bit faster.

  6. #6
    Forum Contributor
    Join Date
    05-03-2013
    Location
    Costa Rica
    MS-Off Ver
    MS Excel 365
    Posts
    141

    Re: Need separate codes to remove first and last character from cells

    Thank you all! Now it worked!

+ 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] Formula to remove first two character is second character is a number.
    By herbie226 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-20-2013, 02:59 PM
  2. [SOLVED] Remove first character in a cell when the second character is blank
    By eastdallasguy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-01-2013, 03:11 PM
  3. how to remove a character from the middle of text on all cells
    By webuxer in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-30-2013, 06:01 PM
  4. Replies: 3
    Last Post: 11-20-2012, 10:03 PM
  5. Remove character from excel cells
    By VMAMedia.com in forum Excel General
    Replies: 1
    Last Post: 01-21-2007, 10:37 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