Replace Numbers with Letters in Excel Using a Formula
Question details
Convert the digits in a number to specified letters using a spreadsheet formula.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A user wants to apply a digit-to-letter mapping to values such as 1070 and 1278.
- Observed behavior
- Each digit should become its mapped letter, producing results such as EBQB and EJQL.
Enter a digit-only value in cell A1 and confirm the letter assigned to each digit. If leading zeros matter, format the cell as Text before entering the value.
Use XLOOKUP to convert each digit in Excel
Use this formula in Microsoft 365 or Excel 2021 to apply a digit-by-digit mapping.
The example mapping is 0=B, 1=E, 2=J, 3=O, 4=T, 5=Y, 6=V, 7=Q, 8=L, and 9=G. Change the letters in the formula if your mapping differs.
The formula treats 10 as two digits, not as a separate value with its own letter.
Type a digit-only value such as 1070 in cell A1.
In cell B1, enter =TEXTJOIN("",TRUE,XLOOKUP(MID(A1,SEQUENCE(LEN(A1)),1),{"0","1","2","3","4","5","6","7","8","9"},{"B","E","J","O","T","Y","V","Q","L","G"},"?")) and press Enter.
Check that B1 displays EBQB, then drag the fill handle down to apply the formula to other values in column A.

Use nested SUBSTITUTE functions in older Excel versions
Use SUBSTITUTE when XLOOKUP or SEQUENCE is unavailable.
Convert Digits to Letters in WPS Spreadsheet
Use nested SUBSTITUTE functions in WPS Spreadsheet to replace each digit with its assigned letter and fill the formula down a column.
- 1. Open a spreadsheet: Open WPS Spreadsheet and create a workbook or open an existing Excel file.
- 2. Enter the source value: Type 1070 in cell A1, or select the cell containing your digit-only value.
- 3. Enter the formula: In B1, enter =SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1,"0","B"),"1","E"),"2","J"),"3","O"),"4","T"),"5","Y"),"6","V"),"7","Q"),"8","L"),"9","G") and press Enter.
- 4. Fill the formula down: Check that B1 shows EBQB, then drag the fill handle down to convert additional values in column A.

Frequently Asked Questions
How do I change which letter a digit becomes?
In the XLOOKUP formula, change the corresponding letter in the second array. In the SUBSTITUTE formula, change the replacement letter paired with that digit.
Why is a leading zero missing from my result?
Excel removes leading zeros from numbers. Format the input cell as Text before entering the value, or type an apostrophe before the value, such as '0127.
Can I assign a separate letter to the number 10?
The formulas shown process one digit at a time, so 10 becomes EB. A separate mapping for 10 requires a rule that distinguishes it from the individual digits 1 and 0.
Why does the XLOOKUP result contain a question mark?
The formula returns a question mark for a character outside the 0–9 lookup list. Check the source cell for spaces, punctuation, or other non-digit characters.




