+ Reply to Thread
Results 1 to 5 of 5

Delete a comma on the right side of the cell

  1. #1
    Forum Contributor
    Join Date
    09-29-2008
    Location
    usa
    MS-Off Ver
    EXCEL 2010
    Posts
    116

    Delete a comma on the right side of the cell

    Hi Does anybody has a macro capable of remove the comma on the right side of the cell
    Some names comes with a comma after the name and some they come normal


    Before
    HTML Code: 

    Desire result:
    HTML Code: 
    Thank you for your help

  2. #2
    Forum Contributor
    Join Date
    08-22-2011
    Location
    Texas, United States
    MS-Off Ver
    Excel 2007 and 2010
    Posts
    516

    Re: Delete a comma on the right side of the cell

    You could just use this formula here in cells B2 and drag down so you don't need a macro. Does this work?

    =IF(RIGHT(A1,1)=",",REPLACE(A1,LEN(A1),1,""),A1)

    If you needed a macro, all you would need to do is record yourself putting this formula in and place it in any existing code that you may have.

  3. #3
    Valued Forum Contributor
    Join Date
    05-08-2012
    Location
    Georgia, USA
    MS-Off Ver
    Excel 2003, 2010
    Posts
    811

    Re: Delete a comma on the right side of the cell

    =if(right(a1,1)=",",left(a1,len(a1)-1),a1)
    Click on star (*) below if this helps

  4. #4
    Forum Contributor
    Join Date
    09-29-2008
    Location
    usa
    MS-Off Ver
    EXCEL 2010
    Posts
    116

    Re: Delete a comma on the right side of the cell

    Thank you those formulas worked for me

  5. #5
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Delete a comma on the right side of the cell

    @ martinez_pedro

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

+ 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