Function Problems

Excel Formula to Extract Trailing Letters from Text Strings

Amos GikundaAmos Gikunda Nov 2, 2026 869 views

Question details

The user needs to extract only the trailing letters from an alphanumeric text value in an Excel cell, ensuring that leading letters and numbers are ignored.

How to Extract Trailing Letters from Text in Excel
Product
Excel
Device & OS
not provided
Scenario
Cleaning up and standardizing data where item codes or location values contain trailing letter identifiers (e.g., extracting 'A' from 'B9A' or 'G' from '100G1').
Observed behavior
Standard text extraction functions often pull all non-numeric characters, which unintentionally includes leading letters. A more targeted formula is required to isolate the end characters.
Before you start

Verify whether you are using a version of Excel that supports Dynamic Array formulas (like Microsoft 365), as this determines which specific functions (such as SEQUENCE) you can utilize.

Solution 1Recommended

Extract Specific Trailing Characters Using MID and IFERROR

This solution is highly recommended if you only want to extract letters from the final few positions of a string, ignoring any leading letters at the beginning of the text.

This formula checks the last three positions of a text string individually. It verifies if the character is a letter by attempting to convert it to a value. If it is text, it extracts it; otherwise, it returns a blank.

1
Select the target cell

Click on the empty cell where you want the extracted trailing letters to appear.

2
Enter the formula

Type the following formula into the formula bar: =IFERROR(IF(ISNUMBER(VALUE(MID(A1,LEN(A1)-2,1))),"",MID(A1,LEN(A1)-2,1)),"")&IFERROR(IF(ISNUMBER(VALUE(MID(A1,LEN(A1)-1,1))),"",MID(A1,LEN(A1)-1,1)),"")&IFERROR(IF(ISNUMBER(VALUE(MID(A1,LEN(A1),1))),"",MID(A1,LEN(A1),1)),"")

3
Apply and fill down

Press Enter to evaluate the formula. Then, drag the fill handle (the small square at the bottom-right corner of the cell) down to apply this formula to the rest of your data.

Extract Specific Trailing Characters Using MID and IFERROR
Precision Extraction: This formula successfully ignores leading letters like 'P' in 'P1' or 'B' in 'B9A', returning only the trailing letters as intended.
Advanced Formula Processing

Use WPS Spreadsheet for Complex Data Extraction

WPS Spreadsheet fully supports complex array formulas, standard text extraction functions, and error handling methods. It handles Microsoft Excel formulas seamlessly, making advanced data manipulation straightforward and efficient.

  1. 1. Open WPS Spreadsheet: Launch WPS Office and open your existing spreadsheet containing the alphanumeric data.
  2. 2. Apply the extraction formula: Select an empty cell next to your data and paste the targeted MID and IFERROR formula.
  3. 3. Drag to fill: Click the bottom-right corner of the active cell and drag downward to extract trailing letters for the entire column.
Seamless compatibility with Microsoft Excel formulas (.xlsx)Supports advanced functions like MID, CONCAT, and IFERROR out of the boxFree, lightweight, and incredibly fast for processing large datasetsFamiliar user interface requires no learning curve
microsoft office alternative - wps office

Frequently Asked Questions

Why am I getting a #SPILL! error when using the SEQUENCE formula?

A #SPILL! error occurs when a dynamic array formula attempts to output multiple results into adjacent cells, but those cells are already occupied by other data. Ensure the adjacent cells are empty, or wrap the formula in a function like CONCAT to collapse the array into a single cell.

How can I extract only the numbers instead of the letters?

To extract only numbers, you can invert the logic in the IF statement. Instead of returning a blank when ISNUMBER is true, return the character itself, and return a blank when it evaluates to false.

Does WPS Office support dynamic array formulas like SEQUENCE?

Yes, newer versions of WPS Office fully support dynamic array functions like SEQUENCE, UNIQUE, and FILTER, allowing complete compatibility with modern Excel spreadsheets.