Method 1 – Apply TEXTJOIN Function to Remove Numeric Characters from Cells
Steps:
- Create a new column, next to your existing column, where you will extract the result.
- In cell C4, enter the following formula.
=TEXTJOIN("",TRUE,IF(ISERR(MID(B4,ROW(INDIRECT("1:100")),1)+0),MID(B4,ROW(INDIRECT("1:100")),1),""))
Formula Breakdown:
- We used the MID function, followed by the ROW function, and the INDIRECT function to cast the letters in a text string.
- The MID function is applied to extract the text in B4, one text at a time.
- Where 100 represents the maximum number to look at. This MID function starts an array containing 100 numbers like this,{1,2,3,4,5,6,7,8….99,100}
- We use this array as a start_num argument, and for num_chars, we use 1.
- Numeric text values like 1,2,3 will convert without errors and the non-numeric numbers won’t be able to do that. As a result, they will return a #Value We use the IF function and the ISERR function to catch those errors and bring those values into the existing array.
- If we don’t get an error, it’s a number and for that, we insert an empty string (“”) into the array in place of the number.
- The final result goes into the TEXTJOIN function as text1. For the delimiter, we use an empty string (“”) and to ignore_empty we supply TRUE.
- TEXTJOIN returns the result by connecting all non-empty values in the array.
- Press CTRL+SHIFT+ENTER to get the result. If you are using Excel 365, press ENTER.
- Utilize the AutoFill tool for the entire column.
Read More: How to Remove Non-numeric Characters from Cells in Excel
Method 2 – Combination of TEXTJOIN and SEQUENCE Functions for Removing Numeric Characters
Steps:
- Use the SEQUENCE function based formula if you are using Excel 365.
=TEXTJOIN("",TRUE,IF(ISERR(MID(B4,SEQUENCE(LEN(B4)),1)+0),MID(B4,SEQUENCE(LEN(B4)),1),""))
Formula Breakdown:
- The SEQUENCE function can replace the ROW and the INDIRECT functions and serve the same purpose.
- In this formula, we used the SEQUENCE and the LEN function to build an array of the correct length in one step.
- Press ENTER.
- Apply the same formula to the rest of the cells to achieve the final result with the AutoFill tool.
Method 3 – Erase Numeric Characters from Cells Through LET Function
Steps:
- Select cell C4 and insert the following formula.
=LET(ARRAY,SEQUENCE(LEN(B4)),TEXTJOIN("",TRUE,IF(ISERR(MID(B4,ARRAY,1)+0),MID(B4,ARRAY,1),"")))
Note:
Using the LET function without creating an array twice, we can define the array as a variable and create it just once.
- Press ENTER and apply the same formula to all cells.
Method 4 – Use the TRIM Function to Delete Numeric Characters from Cells
Steps:
- In cell C4, enter the following formula.
=TRIM(TEXTJOIN("",TRUE,IF(ISERR(MID(B4,ROW(INDIRECT("1:100")),1)+0),MID(B4,ROW(INDIRECT("1:100")),1),"")))
Note:
We added the TRIM function in front of the TEXTJOIN formula discussed in method 1. You can also use the SEQUENCE or the LET-based formula.
- Press ENTER to get the result.
Method 5 – Run VBA Code to Remove Numeric Characters from Cells
Steps:
- Press Alt+11 to open the VBA macro window.
- A new window is opened.
- Click Insert and select Module to open a new module.
- Insert the VBA code to remove numeric characters. You can enter the following code and use it in your worksheet.
Sub RemoveNumber()
Dim Rng As Range
Dim WorkRng As Range
On Error Resume Next
xTitleId = "VBA code to remove number"
Set WorkRng = Application.Selection
Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8)
For Each Rng In WorkRng
xOut = ""
For i = 1 To Len(Rng.Value)
xTemp = Mid(Rng.Value, i, 1)
If xTemp Like "[0-9.]" Then
xStr = ""
Else
xStr = xTemp
End If
xOut = xOut & xStr
Next i
Rng.Value = xOut
Next
End Sub
- Run the code and select your range.
- Click OK.
- We have successfully removed those numeric characters from our cells.
Read More: How to Remove Characters from String Using VBA in Excel
Things to Remember
- If you are using the array formulas, press CTRL+SHIFT+ENTER simultaneously to get the result. In Excel 365, just press ENTER.
- The SEQUENCE function is only available for Excel 365 version.
- The TEXTJOIN function is available only in Excel 2019 and above.
Download Practice Workbook
Related Articles
- How to Remove Characters from Left in Excel
- How to Remove Characters from Left and Right in Excel
- How to Remove Special Characters in Excel
- How to Remove Characters After a Specific Character in Excel
- Excel Remove Characters From Right
<< Go Back To Remove Specific Characters in Excel | Excel Remove Characters | Data Cleaning in Excel | Learn Excel
Get FREE Advanced Excel Exercises with Solutions!