How to remove last characters from Excel spreadsheet cell

These Adverts help to pay for this site. ai2

One of those little things that sometimes needs to be done when working with many lines of information is the removal of an odd character here and there.


These Adverts help to pay for this site ai6.

I was in just that position today.  I had about 2,000 lines of information, and about 600 of them ended with a comma, and the rest didn’t.

I needed them all to be without the comma.  Unfortunately, there were a number of other commas in the lines so I couldn’t just do a simple find and replace.

So, this is the excel code that I used:

=LEFT(A1, LEN(A1)-1)

This removed the last character from the data in cell A1.


Agoda HolidaysAgoda HolidaysThese Adverts help to pay for this site. ai5

I used the filter options to only select cells that ended with the comma, and then applied that code to those lines.

I then copied the entire column and pasted as text, where I needed the corrected information.

Other similar codes:

To remove the first few characters

=RIGHT(A1, LEN(A1)-3)

This will remove the first 3 characters of the cell content.


654.1 - 579,233
DreamHost

Scroll down for Comments
0 0 vote
Article Rating
Subscribe
Notify of

This site uses Akismet to reduce spam. Learn how your comment data is processed.

1 Comment
Inline Feedbacks
View all comments