Remove Non-numeric Characters from a Cell in Excel Office 365!!
Tags: excelpreface, removenonnumericchar, excelbasics, exceltutorials
Published: 2021-01-18 04:02:28

---
title: Remove Non-numeric Characters from a Cell in Excel Office 365!!
published: true
date: 2021-01-12 03:44:03 UTC
tags: ExcelPreface,RemoveNonnumericchar,ExcelBasics,ExcelTutorials
canonical_url: https://geekexcel.com/remove-non-numeric-characters-from-a-cell-in-excel-office-365/
---

Do you know how to **remove non-numeric characters from a cell** in Excel? Here, we come up with the instructions to remove alphanumeric characters easily in the Excel worksheet. We have illustrated two examples using a formula and the VBA function. Let’s see them one-by-one in this article.
## Remove Non-numeric Characters using Formula:

If you want to eliminate non-numeric characters from a text cell, then you can use the below formula.

**=[TEXTJOIN](https://geekexcel.com/excel-textjoin-function-definition-with-examples/)(“”,[TRUE](https://geekexcel.com/use-true-function-in-microsoft-excel-365-simple-methods/),[IFERROR](https://geekexcel.com/use-iferror-function-in-microsoft-excel-365-easy-tutorial/)([MID](https://geekexcel.com/how-to-use-mid-function-in-microsoft-excel-365/)(B1,[ROW](https://geekexcel.com/row-function-in-microsoft-excel-365-how-to-use/)([INDIRECT](https://geekexcel.com/use-indirect-function-in-microsoft-excel-365-in-easy-ways/)(“1:”&[LEN](https://geekexcel.com/how-to-use-len-function-in-microsoft-excel-365/)(B1))),1)+0,””))**  

- **TEXTJOIN function –** The Excel TEXTJOIN Function concatenates or joins values with a given delimiter separating each value. This function will efficiently concatenate the ranges if the delimiter is an empty text string.
- **TRUE function –** It returns the value TRUE if the given conditions will be TRUE or Vice Versa.
- **IFERROR function –** The Excel IFERROR function returns a custom result when a formula generates an error and a standard result when no error is detected.
- **MID function –** It extracts the number (starting from the left side) or characters from the given string.
- **ROW Function –** The ROW function returns the row number for a reference.
- **INDIRECT function –** The INDIRECT Function in Excel returns a valid reference from a given text string.
- **LEN function –** Use the LEN function to find the length of the text string.

### Example 1:

- First, you need to [open the workbook](https://geekexcel.com/open-a-workbook-using-shortcut-in-excel-365/).
- Then you have to **enter** the above-given **formula** in **cell C1.**

![Enter the formula](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2021/01/EXCEL_R4vbcAhsi0.png)<figcaption id="caption-attachment-20944">Enter the formula</figcaption>

- After pressing the **Enter key,** you will get the result as shown in the below image.

![Result](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2021/01/EXCEL_ElaYQwd9ie.png)<figcaption id="caption-attachment-20945">Result</figcaption>

## Delete Non-numeric Characters using VBA:

Let’s see the steps to delete non-numeric characters using the VBA function.

### Example 2:

- First, you need to open the [Visual Basic Editor](https://geekexcel.com/shortcut-to-open-vba-editor-in-microsoft-excel-365/) by clicking the[**ALT**  +  **F11**](https://geekexcel.com/shortcut-to-open-vba-editor-in-microsoft-excel-365/) Keys.
- Then, you need to go to the **insert tab** and **select** the **module** option from the menu.

![select module option](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2020/12/EXCEL_eadfxDWr3B.png)<figcaption id="caption-attachment-19857">select module option</figcaption>

- After that, enter the below VBA codes in the code window.

VBA code to remove non-numeric characters

Sub RemoveNonNumber()  
Set myRange = Application.Selection  
Set myRange = Application.InputBox(“select a Range that you want to remove non-numeric characters”, “RemoveNonNumber”, myRange.Address, Type:=8)  
For Each myCell In myRange  
LastString = “”  
For i = 1 To Len(myCell.Value)  
mT = Mid(myCell.Value, i, 1)  
If mT Like “[0-9]” Then  
tString = mT  
Else  
tString = “”  
End If  
LastString = LastString & tString  
Next i  
myCell.Value = LastString  
Next  
End Sub

- Finally, you need to **save the code.**

![Enter the code](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2021/01/EXCEL_528FtkS5VO.png)<figcaption id="caption-attachment-20946">Enter the code</figcaption>

- Then get back to the workbook and select the **Macros** option under the **Developer tab.**

![Macros option](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2020/12/image.png)<figcaption id="caption-attachment-19846">Macros option</figcaption>

- After that, it will display the **Macro**   **dialog box.**
- You need to select the **Macros name** and click the **Run** Button.

![Macro Dialog box](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2021/01/EXCEL_3Ehm1rxTw4.png)<figcaption id="caption-attachment-20947">Macro Dialog box</figcaption>

- You need to select the range that you want to remove non-numeric letters.

![Click OK button](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2021/01/EXCEL_kX2YBG6rua.png)<figcaption id="caption-attachment-20948">Click OK button</figcaption>

- It will display the result as shown in the below image.

![Output](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2021/01/EXCEL_bC9xpw7DWy.png)<figcaption id="caption-attachment-20949">Output</figcaption>

## Conclusion:

From the above article, we explained how to **Remove Non-numeric characters from a cell** in **Excel Office 365** in a simple way. Please feel free to share your **query** or **feedback** in the below comment section. Thank you so much for reading!! To learn more, check out our website **[Geek Excel](https://geekexcel.com/)!! **