How to separate letters and numbers in a cell in Excel
Excel formula
=LEFT(A2,MIN(FIND({0,1,2,3,4,5,6,7,8,9},A2&"0123456789"))-1)Find the first digit and take everything before it: =LEFT(A2,MIN(FIND({0,1,2,3,4,5,6,7,8,9},A2&"0123456789"))-1) returns the letters.
- Result on the example
- one result per row in
B2, filled down toB6 - Works in
- Microsoft 365 only
- Google Sheets
- Different formula, see below
See it work
The formula is already in B2, filled down to B6. Change any input and the result updates, or edit the formula to experiment.
How it works
FIND looks for each digit 0 to 9 at once and returns ten positions. Adding "0123456789" to the end of the text guarantees every digit is found somewhere, so there are no errors, and MIN gives the position of the first digit. LEFT keeps the characters before it.
=LEFT(A2,MIN(FIND({0,1,2,3,4,5,6,7,8,9},A2&"0123456789"))-1)Result"ABC"
A2"ABC123"The value in A2.
{0,1,2,3,4,5,6,7,8,9}{1 row × 10 cols} 0, 1, 2, 3, …An array of values.
A2&"0123456789""ABC1230123456789"The & operator joins as text.
FIND({0,1,2,3,4,5,6,7,8,9},A2&"0123456789"){1 row × 10 cols} 7, 4, 5, 6, …FIND: Position of text, case-sensitive.- find_text
{0,1,2,3,4,5,6,7,8,9}{1 row × 10 cols} 0, 1, 2, 3, … - within_text
A2&"0123456789""ABC1230123456789"
- find_text
MIN(FIND({0,1,2,3,4,5,6,7,8,9},A2&"0123456789"))4MIN: Smallest number.- number1
FIND({0,1,2,3,4,5,6,7,8,9},A2&"0123456789"){1 row × 10 cols} 7, 4, 5, 6, …
- number1
MIN(FIND({0,1,2,3,4,5,6,7,8,9},A2&"0123456789"))-13The - operator subtracts.
LEFT(A2,MIN(FIND({0,1,2,3,4,5,6,7,8,9},A2&"0123456789"))-1)"ABC"LEFT: Characters from the start of text.- text
A2"ABC123" - num_chars
MIN(FIND({0,1,2,3,4,5,6,7,8,9},A2&"0123456789"))-13
- text
In Google Sheets
Google Sheets needs a different formula: =REGEXEXTRACT(A2,"^[A-Za-z]+"). On the same data it gives the same result. Here it is running in Google Sheets mode.
Other ways to do it
Each one was run on the same example sheet.
| Formula | Result | When to use it |
|---|---|---|
| =LET(p,MIN(FIND({0,1,2,3,4,5,6,7,8,9},A2&"0123456789")),LEFT(A2,p-1)) | ABC, XY, NWD… | Excel 365: LET names the first-digit position, which you can reuse for the numbers in C2. |
Common mistakes
- This assumes the letters come first. For codes like "12AB", flip it: the digits are everything before the first letter.
- In Google Sheets, FIND with a list of digits needs ARRAYFORMULA; REGEXEXTRACT is simpler there.
Try it yourself
Same data, empty answer cell. Your formula is graded instantly, then re-checked on changed data, so a typed-in number won't pass.
Separate letters and numbers in a cell
B2, extract the letters at the start of the code (everything before the first digit), and fill down to B6.Questions
How do I get the numbers part?
Start at the first digit: =MID(A2,MIN(FIND({0,1,2,3,4,5,6,7,8,9},A2&"0123456789")),LEN(A2)). Wrap it in VALUE for a number.
How do I do it in Google Sheets?
Use =REGEXEXTRACT(A2,"^[A-Za-z]+") for the letters and =REGEXEXTRACT(A2,"\d+") for the digits.
Checked by running on 2026-10-30: every formula and result on this page was calculated by the Spreadsheet Practice formula engine, in both Excel and Google Sheets modes.