How to remove non-numeric characters from cells in Excel?
Excel users often encounter data that includes a mix of numbers and non-numeric characters, such as letters or symbols. Cleaning up this data can be essential for further analysis or reporting. In this guide, we'll explore four methods to remove non-numeric characters from cells in Excel, ensuring your data is clean and usable.
![](http://cdn.extendoffice.com/images/stories/doc-excel/non-numeric-characters/remove-non-numeric-characters-from-cells-in-excel-09.png)
- By using a formula (Excel 2021 and later)
- By using Kutools AI Aide (Intelligent & Efficient)
- By using an amazing tool (One click)
- By using VBA code
Remove non-numeric characters from cells in Excel
In this section, we will introduce four effective methods to remove non-numeric characters from Excel cells, tailored for different versions of Excel and user expertise levels.
Remove non-numeric characters from cells in Excel by using a formula
To remove non-numeric characters from cells in Excel, you can use a formula based on the TEXTJOIN function.
Step 1: Select a cell and apply the formula
In cell C2, apply the formula below, and press the Enter key to get the result.
=TEXTJOIN("",TRUE,IFERROR(MID(A2,SEQUENCE(LEN(A2)),1)+0,""))+0
![](http://cdn.extendoffice.com/images/stories/doc-excel/non-numeric-characters/remove-non-numeric-characters-from-cells-in-excel-02.png)
Step 2: Apply the formula to other cells and get all results
After calculating the initial result, drag the fill handle from the formula cell (C2 in this example) down to apply the formula to other cells, extending it to cell C8.
![](http://cdn.extendoffice.com/images/stories/doc-excel/non-numeric-characters/remove-non-numeric-characters-from-cells-in-excel-03.png)
- LEN(A2): Finds the length of the string in A2.
- SEQUENCE(LEN(A2)): Creates a list of numbers from 1 to the length of the string. Each number corresponds to a character position in the string.
- MID(A2, SEQUENCE(LEN(A2)), 1): Extracts each character from A2 one at a time.
- +0: Tries to convert each character into a number. If a character isn't a number, it causes an error.
- IFERROR(..., ""): If converting a character causes an error (meaning it's not a number), it's replaced with an empty string.
- TEXTJOIN("", TRUE, ...): Combines all the characters back into a single string, skipping any empty strings (the non-numerics that were removed).
- +0 at the end: Converts the final string of numbers back into a numeric value.
Remove non-numeric characters from cells in Excel by using Kutools AI Aide
Kutools for Excel's AI Aide feature offers unparalleled convenience in cleaning Excel sheets by effortlessly removing non-numeric characters. With just a simple input from you, this powerful tool takes over, automatically analyzing and executing the required tasks without the need for complex formulas. This not only speeds up the process but also eliminates the potential for errors, significantly boosting your productivity and accuracy. The AI Aide turns what could be a tedious manual task into a seamless, efficient operation, making it an essential asset for any Excel user aiming to optimize their workflows.
After downloading and installing Kutools for Excel, click Kutools AI > AI Aide to open the Kutools AI Aide pane.
1. In the Kutools AI Aid pane, enter your request like the text below into the chat box, and click Send button or press Enter key to submit your query.
"Please remove non-numeric characters from range A2:A8 in Excel for me."
2. Once the tool has analyzed your input, click the Execute button. Kutools AI Aide will employ its AI technology to process your request and apply the results directly in Excel.
![](http://cdn.extendoffice.com/images/stories/doc-excel/non-numeric-characters/remove-non-numeric-characters-from-cells-in-excel-06.gif)
Tip: To use this feature, you should install Kutools for Excel first, please click to download and have a 30-day free trial now.
Remove non-numeric characters from cells in Excel by using an amazing tool
For efficiently cleaning data by removing non-numeric characters across a specified range, Kutools for Excel’s Remove Characters utility provides a one-click solution. This powerful tool simplifies what can often be a cumbersome process, allowing you to swiftly eliminate unwanted characters from your data, ensuring cleaner, more usable results instantly.
1. After selecting the range from where you want to remove non-numeric characters, click Kutools > Text > Remove Characters.
2. In the Remove Characters dialog box, check the Non-numeric option, and click OK. Then the non-numeric characters are removed from the selection immediately.
![](http://cdn.extendoffice.com/images/stories/doc-excel/non-numeric-characters/remove-non-numeric-characters-from-cells-in-excel-07.gif)
Tip: To use this feature, you should install Kutools for Excel first, please click to download and have a 30-day free trial now.
Remove non-numeric characters from cells in Excel by using VBA code
To remove non-numeric characters from a range with VBA code, please do as follow:
Step 1: Open the VBA module editor and copy the code
- Hold down the ALT + F11 keys in Excel, and it opens the Microsoft Visual Basic for Applications window.
- Click Insert > Module, then copy and paste the following code in the Module Window.
- VBA code: Remove all non-numeric characters
Sub RemoveNotNum() 'Updateby Extendoffice Dim Rng As Range Dim WorkRng As Range On Error Resume Next xTitleId = "KutoolsforExcel" 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 = xTemp Else xStr = "" End If xOut = xOut & xStr Next i Rng.Value = xOut Next End Sub
Step 2: Execute the code
- After pasting this code, please press F5 key to run this code.
- In the popping up KutoolsforExcel dialog box, select a range from which you want to remove the non-numeric characters, then click OK.
Result
Then all non-numeric characters in selected range are removed.
Sub RemoveNotNum() 'Updateby Extendoffice Dim Rng As Range Dim WorkRng As Range On Error Resume Next xTitleId = "KutoolsforExcel" 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 = xTemp Else xStr = "" End If xOut = xOut & xStr Next i Rng.Value = xOut Next End Sub
- Result
Related articles
How to remove leading and trailing spaces in Excel?
In this article, we'll explore two efficient methods to remove leading and trailing spaces in Excel.
How To Remove First, Last X Characters Or Certain Position Characters From Text In Excel?
For most of Excel users, sometimes, you need to delete first n characters from the beginning of the text strings or remove the last x characters from the end of the text strings as below screenshot shown. This article, I will introduce some handy tricks for solving this task quickly and easily in Excel.
Find the nth occurrence of a character in Excel – 3 quick ways
For instance, let's find the 2nd or 3rd occurrence of the character "-" in a text string. I'll demonstrate straightforward techniques to efficiently accomplish this task.
Character Counting in Excel: Cell & Range (Easy Guide)
In the vast world of Excel, understanding the intricacies of data manipulation is vital. One such aspect is counting characters, specific characters, or certain text within cells or a range of cells. This guide will enlighten you on the step-by-step ways to achieve this. Whether you're a beginner or an Excel wizard, there's always something new to learn!
Best Office Productivity Tools
Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time. Click Here to Get The Feature You Need The Most...
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
![Screen Shot of Excel (with Office Tab installed)](http://cdn.extendoffice.com/images/stories/kte-module/officetab-bottom-02.gif)