Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to remove last/first character if it is a comma or certain character in Excel?

For a range of data, you may want to delete the last or first character if it is a comma or other character in Excel. This article will show you two methods to achieve it.

Delete last/first character if it is a comma or certain character with formula

Delete last/first character if it is a comma or certain character with Kutools for Excel


arrow blue right bubbleDelete last/first character if it is a comma or certain character with formula


You can apply the following formulas to delete the last or first character if it is a comma or certain character in Excel.

1. Select a blank cell (says C1) in the help column, enter formula =IF(RIGHT(A1,1)=",",LEFT(A1,LEN(A1)-1),A1) into the Formula Bar, and then press the Enter key.

Notes:

1. In the formula, A1 is the cell with last character you need to remove, “,” is the comma symbol which belongs to the last character of cell A1. You can change the comma symbol to any other character as you need.

2. You can apply this formula =IF(LEFT(A1,1)=",",RIGHT(A1,LEN(A1)-1),A1) to remove the first character if it is a comma.

2. Keep selecting cell C1, then drag the Fill Handle to the corresponding cells for deleting all last characters if they are met the condition. Then you can see all commas after the specified cells are removed as below screenshot shown.


arrow blue right bubbleDelete last/first character if it is a comma or certain character with Kutools for Excel

This section will show you the Select Specific Cells utility and the Delete by Position utility of Kutools for Excel. With these two utilities, you can easily select all cells which end or begin with certain character, and then remove them from the selected cells at once.

Kutools for Excel : with more than 300 handy Excel add-ins, free to try with no limitation in 60 days. 

1. Select a range of cells you want to find cells end or begin with certain character, then click Kutools > Select > Select Specific Cells. See screenshot:

2. In the Select Specific Cells dialog box, select the Cell option in the Selection type section, and in the Specific type section, choose Ends with or Begins with from the first drop-down list and then type a comma or other character you need into the following textbox, and finally click the OK button.

Note: If you need to select cells with two criteria, for example select all cells which end with comma and cells end with character “n”, please enable these two conditions with selecting the And option, choose Ends with or Begins with from the two drop-down lists, and then type comma mark and the character “n” into the textboxes consecutively.

3. Then a dialog box pops up to tell you how many cells are selected, click the OK button and all qualified cells are selected immediately. Now you need to click Kutools > Text > Remove by Position.

4. In the Remove by Position dialog box, enter number 1 into the Numbers box, select From right to remove the last character or From left to remove the first character in the Position section (here we select the From right option), and then click the OK button.

You can see all last characters of selected cells are removed immediately. See screenshot:

You can download and try the free trial now!

Recommended Productivity Tools

Ribbon of Excel (with Kutools for Excel installed)

300+ Advanced Features Increase Your Productivity by 71%, and Help You To Stand Out From Crowd!

Would you like to complete your daily work quickly and perfectly? Kutools For Excel brings 300+ cool and powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) for 1500+ work scenarios, helps you solve 82% Excel problems.

  •  Deal with all complicated tasks in seconds, help to enhance your work ability, get success from the fierce competition, and never worry about being fired.
  •  Save a lot of work time, leave much time for you to love and care the family and enjoy a comfortable life now.
  •  Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands, and give you a healthy body.
  •  Become an Excel expert in 3 minutes, and get admiring glance from your colleagues or friends.
  •  No longer need to remember any painful formulas and VBA codes, have a relaxing and pleasant mind, give you a thrill you've never had before.
  •  Spend only $39, but worth than $4000 training of others. Being used by 110,000 elites and 300+ well-known companies.
  •  60-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years. Buy once, use forever.
  •  Change the way you work now, and give you a better life immediately!

Office Tab Brings Efficient And Handy Tabs to Office (include Excel), Just Like Chrome, Firefox, And New IE

  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Open and create documents in new tabs of same window, rather than in new windows.
  • Help you work faster and easily stand out from the crowd! One second to switch between dozens of open documents!
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Excel FAn · 26 days ago
    Why is that every time I try to use KUTOOL , It crashes the application and close out the excel without saving. Its frustrating . Can someone help. It looks like cool tool to use
  • To post as a guest, your comment is unpublished.
    chungdc · 1 years ago
    Hi, I am trying to remove initials that exist at the end of some names in a list, using this method. My formula is =IF(LEFT(A1,2)=",",RIGHT(A1,LEN(A1)-2),A1) so that John S becomes John. Thanks