How to Remove Trailing Commas in Excel

Written by dan howard
  • Share
  • Tweet
  • Share
  • Pin
  • Email
How to Remove Trailing Commas in Excel
It takes a combination of functions to trim trailing commas from a data array. (Thinkstock/Comstock/Getty Images)

Sometimes you may find unpleasant surprises in data when you import a file into the Microsoft Excel spreadsheet application. In some cases, you might have an extraneous character, such as a comma, that appears at the end of cell strings. To remove trailing commas from your Excel cells, you can create a function that checks for a comma at the end of a string and then deletes the final character in the string if it is a comma. Once you've used the formula to strip commas from the cell strings, you can use the Paste Special function to copy the formula output values back to the original data.

Skill level:
Moderately Easy

Other People Are Reading


  1. 1

    Open the worksheet that contains the data from which you want to remove trailing commas.

  2. 2

    Right-click the header of the column directly to the right of the data column that you want to clean. Click "Insert" in the menu to insert a new function column.

  3. 3

    Type the following in the cell in the formula column adjacent to the first data cell:


    Substitute the cell address of your first data cell in place of all instances of "A1" in the above example.

  4. 4

    Press "Enter." Excel first determines whether the rightmost value in the data cell is a comma. If so, it determines the number of characters in the cell using the "Len" function and then returns only the leftmost N minus 1 characters, thus omitting the comma. If no comma is detected at the end of the string, then Excel returns the original cell value.

  5. 5

    Right-click the formula cell and click "Copy." Paste the formula into the cell directly to the right of all cells from which you want to clean the commas. Excel will perform the comma-trimming function on all cells and return the update value in the formula column.

  6. 6

    Highlight all formula cells, then right-click the array and choose "Copy."

  7. 7

    Highlight the original data cells, then right-click the array and choose "Paste Special." Click the radio button next to "Values," then click the "OK" button. Excel will copy the output strings from the comma-less formula cells into your original data cells as static character strings.

  8. 8

    Highlight the formula column, then right-click the array and click "Delete" from the menu. This will delete the formula column now that a permanent copy of the formula output has been saved in the original data column.

Don't Miss

  • All types
  • Articles
  • Slideshows
  • Videos
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the site, you consent to the use of cookies. For more information, please see our Cookie policy.