Function Problems

Replace Numbers with Letters in Excel Using a Formula

Aamir Naveed AkramAamir Naveed Akram Nov 18, 2026 869 views

Question details

Convert the digits in a number to specified letters using a spreadsheet formula.

Replace Numbers with Letters in Excel Using a 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.
Before you start

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.

Solution 1Recommended

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.

1
Enter the source value

Type a digit-only value such as 1070 in cell A1.

2
Enter the formula

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.

3
Check and copy the result

Check that B1 displays EBQB, then drag the fill handle down to apply the formula to other values in column A.

Use XLOOKUP to convert each digit in Excel
Unexpected characters: A question mark in the result indicates a character that is not in the digit lookup list.
WPS Spreadsheet

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. 1. Open a spreadsheet: Open WPS Spreadsheet and create a workbook or open an existing Excel file.
  2. 2. Enter the source value: Type 1070 in cell A1, or select the cell containing your digit-only value.
  3. 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. 4. Fill the formula down: Check that B1 shows EBQB, then drag the fill handle down to convert additional values in column A.
Convert values such as 1070 to EBQB with a customizable formula.Open and edit Microsoft Excel XLSX and XLS files.Apply the same formula to multiple rows with the fill handle.Work in a familiar spreadsheet interface.
microsoft office alternative - wps office

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.