How to remove a specific character from the end of a Excel cell

Submitted by:Jim Taylor

Date added:14 January, 2011

Category:Visual Basic

Here is code to emove a specific character from the end of a Excel cell. Replace 'A1' with the cell and '-' with the character you want to remove. I found it very useful.

Tags: excel , string , cell

Code Snippet:

IF(RIGHT(A1,1)="-",LEFT(A1,LEN(A1)-1),A1)
 
 

Comments