Strip the digits out of a string — turn “Order123” into “Order” — for cleaning product names, categories, or labels. One regex does it; older Excel uses a longer cleanup.
[0-9] matches any digit; replacing with "" deletes them, leaving letters and symbols.
The example
Digits stripped from a code.
| A | B | |
|---|---|---|
| 1 | Text | Letters only |
| 2 | Order123-A | Order-A |
The formula
Delete every digit:
How it works
A regex removes the numbers:
[0-9]is the regex for any single digit.- REGEXREPLACE replaces every match with
"", removing all digits in one pass. - To keep only digits instead, invert it:
REGEXREPLACE(A2, "[^0-9]", ""). - No 365? Chain ten SUBSTITUTEs (one per digit), or use a SUBSTITUTE/TEXTJOIN array trick.
Pre-365 fallback: nest SUBSTITUTE(A2,"0","") through "9" — verbose but works everywhere. The regex version is far cleaner where you have it.
Try it: interactive demo
Type text with digits.
Variations
Keep only digits
Invert the set:
Letters only
Drop everything non-letter:
Pre-365 chain
Nested SUBSTITUTE for each digit.
Pitfalls & errors
365 (2024+) for REGEXREPLACE. Older Excel needs nested SUBSTITUTE.
Decimals & signs. Removing digits also breaks numbers like “3.5” into “.” — be sure you mean to strip all digits.
Result is text. Even if only digits remain, the output is text; wrap with VALUE to use it as a number.
Practice workbook
Frequently asked questions
How do I remove numbers from text in Excel?
How do I keep only the numbers instead?
How do I do this without REGEXREPLACE?
Stop fighting formulas. Learn them in a day.
This recipe is one of hundreds of real-world formulas we teach. Our Excel Formulas & Functions class covers lookups, logic, text, and dynamic arrays hands-on — live in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.
See the Formulas & Functions Class