Excel: How to Use MID Function to End of String

The MID function in Excel allows you to extract a certain portion of a string of text from a cell. This can be particularly useful when you want to extract part of a string from the end of the string. To do this, you specify the start position as the length of the string less the number of characters you want to extract, then specify the number of characters you want to extract. By doing this, you can easily extract the last few characters of a string in an Excel cell.


The MID function in Excel allows you to extract a specific number of characters from a string based on a starting position on the left side of the string.

However, sometimes you want to extract middle characters based on a specific starting character all the way to the end of the string.

You can use the MID function combined with the LEN function to do so:

=MID(A2, 3, LEN(A2))

This particular formula extracts every character in the string in cell A2 starting from the 3rd character all the way to the last character in the string.

The following example shows how to use this formula in practice.

Example: How to Use MID Function to End of String in Excel

Suppose we have the following list of basketball team names:

Suppose we would like to extract the characters from each team ranging from the 3rd character to the last.

We can use the following formula to do so:

=MID(A2, 3, LEN(A2))

The following screenshot shows how to use this formula in practice:

Column B now displays the characters from each team ranging from the 3rd character to the last.

Note that the LEN() function in Excel is used to find the length of a string.

Thus, our formula tells excel to extract the characters in each string ranging from the 3rd character to the character that represents the entire length of the string.

Excel: A Formula for MID From Right
Excel: How to Use MID Function for Variable Length Strings

x