Excel Worksheet Tips: Remove First and Last Character From a String

Perhaps you have a list of data that you wish to remove the first and last characters. For example, there is a list of values similar to these:

“Data”
“Trial”
“Test”

What you are after is the strings inside the inverted commas. You could go through each entry and edit them, or using the formula below:

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

Using this formula, it will format the results to look like this:

Data
Trial
Test

If you wish to remove two characters from the ends, change the -1 values to -2.

 

Or perhaps you only want to remove the FIRST character. If so, use the following code:

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

Or to remove the LAST character, use the following code:

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

 

Useful!

Come check out the directory for the rest of my excel tips!

Submeg

IT

Posted by:submeg

Musician, Writer and Inspirer. I discuss the projects I am working on, the services I provide and my general thoughts.

3 replies on “Excel Worksheet Tips: Remove First and Last Character From a String

  1. Hello. For some reason the =TRIM(LEFT(RIGHT(A1,LEN(A1-1),LEN(RIGHT(A1,LEN(A1)-1))-1)) is not working for me in Excel 2010… Any thoughts?

    Like

Tell me what you think!

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s