How to Remove Numbers From Text in Excel
By ExcelReady TeamUpdated 6 min read
The short answer
To remove numbers from text in Microsoft 365, split the text into characters and keep only the non-digits: =TEXTJOIN("",TRUE,IF(ISERR(--MID(A2,SEQUENCE(LEN(A2)),1)),MID(A2,SEQUENCE(LEN(A2)),1),"")). In any Excel version, nest ten SUBSTITUTE functions, one for each digit from 0 to 9. Wrap the result in TRIM to remove leftover spaces.
Key takeaways
- Excel has no single remove-digits function in most versions, so you either test each character or substitute each digit.
- TEXTJOIN with MID and SEQUENCE keeps every character that isn't a digit (Excel 2021 or Microsoft 365).
- Ten nested SUBSTITUTE functions work in every version, including Excel 2010.
- Wrap the result in TRIM, because removing numbers often leaves double or trailing spaces.
- Flash Fill and Find and Replace work for one-off jobs but don't update when the data changes.
On this page+
To remove numbers from text in Excel, you need a formula that throws away every digit and keeps everything else, because most versions of Excel have no single "remove digits" function. In Excel 2021 or Microsoft 365, a TEXTJOIN formula does it in one cell. In any version, ten nested SUBSTITUTE functions do the same job. This guide shows both, plus quick no-formula options and how to clean up the spaces left behind.
Which method should you use?#
Pick the method by your Excel version and whether the data will change. All the examples use this list of names with customer numbers mixed in:
| A | B | |
|---|---|---|
| 1 | Raw entry | Clean name |
| 2 | Maria Lopez 2041 | Maria Lopez |
| 3 | 3307 James Okafor | James Okafor |
| 4 | Chen Wei 88 | Chen Wei |
| 5 | Aisha Bello 5120 | Aisha Bello |
| 6 | 61 Tom Reyes | Tom Reyes |
| Method | Works in | Updates automatically? | Best for |
|---|---|---|---|
| TEXTJOIN + MID + SEQUENCE | Excel 2021, Microsoft 365 | Yes | Any text, any number of digits |
| Nested SUBSTITUTE | Every version | Yes | Older Excel, shared files |
| Flash Fill | Excel 2013 and later | No | A quick one-off list |
| Find and Replace | Every version | No | Fixing data in place |
If you need the opposite, keeping the numbers and removing the letters, see how to extract numbers from text.
Remove numbers with TEXTJOIN and MID (Microsoft 365)#
This formula checks each character and keeps it only if it isn't a digit. In B2:
=TRIM(TEXTJOIN("",TRUE,IF(ISERR(--MID(A2,SEQUENCE(LEN(A2)),1)),MID(A2,SEQUENCE(LEN(A2)),1),"")))The result is Maria Lopez. Fill it down (Windows: Ctrl+D; Mac: ⌘D) and every row loses its number. SEQUENCE needs Excel 2021 or Microsoft 365.
How the formula works#
Read it from the inside out:
LEN(A2)counts the characters: 16 for "Maria Lopez 2041".SEQUENCE(16)makes the list 1, 2, 3 … 16, one position per character.MID(A2, SEQUENCE(16), 1)takes one character from each position, so you get "M", "a", "r" and so on. The MID function guide explains its three arguments.--tries to turn each character into a number. Digits become numbers; letters and spaces become #VALUE! errors.ISERR(...)is TRUE for the errors, which are the characters you want to keep.IFreturns the character when ISERR is TRUE, and an empty string""for each digit.TEXTJOIN("",TRUE, ...)joins the kept characters with no separator and skips the empty ones. See the TEXTJOIN function guide.TRIMremoves the trailing space left where " 2041" used to be.
In Excel 2019, which has TEXTJOIN but not SEQUENCE, swap SEQUENCE(LEN(A2)) for ROW(INDIRECT("1:"&LEN(A2))) and confirm the formula with Ctrl+Shift+Enter.
Some current Microsoft 365 versions also include REGEXREPLACE, which can do this in one short step: =REGEXREPLACE(A2,"[0-9]",""). If your Excel shows #NAME? for it, use the TEXTJOIN formula instead.
Remove numbers in any Excel version with SUBSTITUTE#
SUBSTITUTE replaces one piece of text with another. Replace a digit with "" (nothing) and it disappears. Nest ten of them to cover 0 to 9:
=TRIM(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2,"0",""),"1",""),"2",""),"3",""),"4",""),"5",""),"6",""),"7",""),"8",""),"9",""))It looks long, but it's ten copies of the same step. The innermost SUBSTITUTE removes every 0, the next removes every 1, and so on. For "3307 James Okafor", the result is James Okafor. This works in every version of Excel, including Excel 2010, so it's the safe choice for files you share widely.
SUBSTITUTE replaces every copy of the digit, not just the first. The SUBSTITUTE function guide covers its optional fourth argument, which replaces only one occurrence. The same idea removes any other unwanted character, as shown in how to remove characters in Excel.
Remove numbers without a formula#
For a one-off clean-up, you can skip formulas.
Flash Fill copies a pattern you type:
- In B2, type the clean version by hand: Maria Lopez.
- In B3, start typing James. Excel suggests the rest of the column in grey.
- Press Enter to accept, or use Data > Flash Fill (Windows: Ctrl+E).
Check a few rows, because Flash Fill guesses the pattern and can get unusual entries wrong.
Find and Replace changes the cells in place. Excel's wildcards (* and ?) match any character, not only digits, so you must replace each digit separately:
- Select the column and press Ctrl+H (Mac: Control+H).
- Type
0in Find what, leave Replace with empty, and click Replace All. - Repeat for 1 to 9.
Both methods give fixed values. If the source data changes, the results don't update.
Remove numbers only from the start or end#
When the number sits at one end, separated by a space, a shorter formula is enough. In Microsoft 365 or Excel 2024:
| Text | Formula | Result |
|---|---|---|
| Maria Lopez 2041 | =TEXTBEFORE(A2," ",-1) | Maria Lopez |
| 3307 James Okafor | =TEXTAFTER(A3," ") | James Okafor |
TEXTBEFORE with -1 keeps everything before the last space. TEXTAFTER keeps everything after the first space. In older versions, =MID(A3,FIND(" ",A3)+1,LEN(A3)) removes a leading number and its space. When the number always has the same length, LEFT, RIGHT and LEN work too; see how to remove the first characters.
Clean up spaces and separators left behind#
Removing digits often leaves spaces or symbols that the digits were attached to. Plan for it:
- Double and trailing spaces. "Room 12 B" becomes "Room B" with two spaces. TRIM fixes this. The guide on how to remove spaces in Excel covers non-breaking spaces that TRIM can't see.
- Separators. "INV-2026-0042" becomes "INV--". Add one more SUBSTITUTE to remove the hyphens.
- Line breaks. Imported text may hide line breaks between the name and the number. Remove them first, as shown in how to remove line breaks.
- Decimal points and signs. The formulas remove digits only, so "Size 7.5" becomes "Size ." Remove the full stop too if it doesn't belong.
When you're happy with the clean column, copy it and use Paste Special > Values to replace the formulas with plain text.
Practise it#
Text clean-up is one of the most common real tasks in Excel, and it shows up in data-entry and analyst tests. Practise cleaning messy text in a live spreadsheet with TRIM and SUBSTITUTE, then practise LEFT, RIGHT, MID and LEN to split text by position. To get comfortable with SEQUENCE and the other new functions, try the modern Excel functions lesson. Each one checks your formula as you type. Then try the exercise on this page.
Try it yourself
This is a live spreadsheet. Type the formula in the green cell and press Enter.
The names in column A have customer numbers mixed in. Click B2 and type =TRIM(TEXTJOIN("",TRUE,IF(ISERR(--MID(A2,SEQUENCE(LEN(A2)),1)),MID(A2,SEQUENCE(LEN(A2)),1),""))) to keep only the letters and spaces, then press Enter.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Clean name | |||
| 2 | Maria Lopez 2041 | |||
| 3 | 3307 James Okafor | |||
| 4 | Chen Wei 88 | |||
| 5 | Aisha Bello 5120 | |||
| 6 | 61 Tom Reyes | |||
| 7 | ||||
| 8 | ||||
| 9 |
Tip: MID splits the text into single characters. --MID turns digits into numbers and everything else into an error, so ISERR is TRUE for the characters you keep.
Practise this in a lesson
Frequently asked questions
How do I remove numbers from a text string in Excel?
In Microsoft 365, use =TEXTJOIN("",TRUE,IF(ISERR(--MID(A2,SEQUENCE(LEN(A2)),1)),MID(A2,SEQUENCE(LEN(A2)),1),"")). In older versions, nest SUBSTITUTE ten times to replace each digit from 0 to 9 with nothing.
Can Find and Replace remove all numbers in Excel?
Not in one step. Excel's Find and Replace only knows the wildcards * and ?, which match any character, not just digits. You can replace 0, then 1, and so on up to 9, which takes ten passes.
How do I remove numbers but keep the spaces between words?
Remove the digits first, then wrap the formula in TRIM. TRIM removes spaces at the start and end and turns double spaces into single ones, so Maria Lopez 2041 becomes Maria Lopez.
How do I remove only the numbers at the end of text?
If a space separates the number, use =TEXTBEFORE(A2," ",-1) in Microsoft 365, which keeps everything before the last space. In older versions, use LEFT with FIND to cut at the space.
Is there a formula to remove numbers in Excel 2016?
Yes. Nest SUBSTITUTE ten times, once for each digit: =SUBSTITUTE(SUBSTITUTE(A2,"0",""),"1","") and so on up to 9. It works in every version of Excel.