How to Remove the Last Character from a String in Google Sheets


If you need to remove the last character from a string in your spreadsheet, you have a few options in Google Sheets.
You can develop a number of formulas to eliminate the last N characters from your data, depending on how many characters you want to remove.
In this article, I’ll demonstrate you how to remove the last character from a string in Google Sheets using multiple approaches.

Using LEFT and LEN Function

To remove the last character from a string, use the LEFT and LEN functions together.
The LEFT method returns a substring that begins at the beginning of a string based on the number of characters given.
The LEN function counts the characters in a string to determine its length.
To eliminate the last character by combining these two functions, the syntax would be:

=LEFT(string, LEN(string) – number_of_characters)

string – this is the string you want to remove the last Nth character from string – this is the string you want to remove the last Nth character from string – this is the string you want to remove the last N.

number_of_characters – this is how many characters you want to remove from the end of the string

LEFT & LEN

Because the LEN counts the amount of characters in your string before subtracting the number of characters you want to eliminate, this formula works. The LEFT function then returns the number of characters from the beginning of your string.

Remove Last Character with MID and LEN Functions

You can also eliminate the desired number of characters by combining the MID and LEN formulas. When provided a starting character and the number of characters to extract, MID will return a segment of a string.
To use it in conjunction with LEN to remove characters from the string’s end, use the following syntax:

=MID(string, 1, LEN(string) – number_of_characters)

This is almost the same as the previous method but your second argument in the function is a 1 to indicate that you want to start at the first character of the string.

MID & LEN

This procedure is nearly identical to the last one. It calculates the length of your string, subtracts the amount of characters you wish to remove, and then returns that number of characters.

Remove Last Character with REPLACE and LEN Functions

Here, REPLACE will be used in combination with LEN.

REPLACE replaces a portion of a string with another text string. We’ll replace the string’s end with a blank character, which will have the same effect as eliminating it.
We’ll use the following syntax to combine these functions:

=REPLACE(string, LEN(string),1, “”)

Here is an example of this usage-

REPLACE & LEN

As you can see, we have several alternatives for removing characters from the string’s conclusion. To find out which characters to eliminate, you must combine functions using the LEN function.

To acquire a better grasp of how each function works, try reproducing each of these formulas in your own spreadsheet.

Harshita Mathur

My name is Harshita Mathur. I come from Jaipur, Rajasthan. I am a law student. Apart from this I am an amateur writer.

Recent Content