How to Extract All But First or Last Character from String in Excel


Excel is a powerful tool that offers a variety of functions for data manipulation and analysis. To extract all but first /last character from string in Excel, you can use a combination of text functions like MID and LEN. Here's a step-by-step guide:

Extract All But First Character from String in Excel

Let us see a simple process to know how to extract all but first character from string in Excel.

Step 1

Consider an Excel sheet where you have a list of sentences as shown in the below image.

Now, first click on an empty cell in our case B2 and enter the formula as =MID(A2, 2, LEN(A2)) and click enter to get all but first character result as shown in the below image.

Empty cell > Formula > Enter

Step 2

To fill all the values, drag down from the first result using the auto-fill handle, and the final result will be similar to the below image.

Extract All But Last Character from String in Excel

Step 1

Click on an empty cell in our case D2 and enter the formula as =LEFT(A2,LEN(A2)-1)and click enter to get all but last character from string result as shown in the below image.

Empty cell > Formula > Enter

Step 2

To fill all the values, drag down from the first result using the auto-fill handle, and the final result will be similar to the below image.

Conclusion

In summary, the formulas =MID(A2, 2, LEN(A2)) and =LEFT(A2, LEN(A2)-1) can be used to extract all but the first and last characters from a string in Excel, respectively.=MID(A2, 2, LEN(A2)) formula starts at the second character of the string in cell A2 and extracts all characters from that position till the end of the string. It effectively removes the first character from the string.

=LEFT(A2, LEN(A2)-1) formula extracts all characters from the left side of the string in cell A2, excluding the last character. By subtracting 1 from the length of the string, it ensures that the last character is excluded. Both formulas allow you to manipulate string data by extracting specific portions of the original string. Depending on your specific requirement, you can use either formula to achieve the desired result. It is important to note that the formula =MID(A2, 2, LEN(A2)) preserves the length of the original string, while the formula =LEFT(A2, LEN(A2)-1) reduces the length by one character.

Updated on: 12-Jul-2023

2K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements