# How to separate letters and numbers in a cell in Excel

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.

**Excel:** `=LEFT(A2,MIN(FIND({0,1,2,3,4,5,6,7,8,9},A2&"0123456789"))-1)` (Microsoft 365 only)

**Google Sheets:** `=REGEXEXTRACT(A2,"^[A-Za-z]+")`

## Example

Sample data (row 1 is the header):

| A | B | C |
| --- | --- | --- |
| Code | Letters | Numbers |
| ABC123 |  |  |
| XY4471 |  |  |
| NWD20 |  |  |
| Q9 |  |  |
| LAB0042 |  |  |

Formula in B2, filled to B6: `=LEFT(A2,MIN(FIND({0,1,2,3,4,5,6,7,8,9},A2&"0123456789"))-1)`

Result: ABC; XY; NWD; Q; LAB

## 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.

## Other ways

- `=LET(p,MIN(FIND({0,1,2,3,4,5,6,7,8,9},A2&"0123456789")),LEFT(A2,p-1))`: 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.

## 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.

Every formula and result on this page was checked by running it in the Spreadsheet Practice formula engine on 2026-10-30.

Source: https://spreadsheetpractice.com/formulas/separate-letters-and-numbers-in-a-cell
