How to Remove Numbers from a Cell in Excel (10 Simple Ways)

Table of Contents

Table of Contents

Manually separating numbers from texts from hundreds of rows is a tedious task no doubt. Unfortunately, Excel hasn’t yet developed any useful feature or direct function to do it quickly. To help you separate alphanumeric data, we’ve come up with multiple easy methods that anyone can follow.

Key Takeaways

You can quickly remove numbers from Excel cells using any of the effective methods given below:

โžค Start by selecting a neighboring cell to the first data string of the column you want to delete numbers from. Type only the texts from the previous cell eliminating the numbers.
โžค Select and drag to highlight the new column. Press the keyboard shortcut  CTRL  +  E  to remove all numbers from the remaining text strings.
โžค Or, go to the Data tab, locate the Data Tools group on the top right corner of your screen, and click on the Flash Fill icon. Repeat the process for a second cell if it doesnโ€™t work the first time.

overview image

Let’s dive into all the different ways of separating mixed text and numbers using simple features including Flash Fill and Power Query. We’ll also cover more complex methods such as using different array formulas and VBA coding.


1

Use the Flash Fill Feature for Patterned Data

In this workbook, we created product datasets for a local shop with various product codes categories. We’ll work on the Category column where all the cells contain alphanumeric values. Our task is to keep the texts only and strip out the digits.

Use the Flash Fill Feature for Patterned Data

Excel typically identifies patterned data, so you can use the Flash Fill feature for text strings with numbers only on the right or left side. Let’s walk through the process.

โžค Select the adjacent cell to your first text string and manually type the text from the first cell without the digits.
โžค For example, in the following pictures, cell D2 has the data string Furniture10. So, we entered Furniture in the E2 cell eliminating the numbers to help Excel recognize the pattern.
โžค Now, select the neighboring cell you’re using as an example, drag through the remaining cells of the column, and use the keyboard shortcut  CTRL  +  E  to apply the flash fill feature.
โžค You can also open the Data tab and click on the Flash Fill icon in the Data Tools group.

Use the Flash Fill Feature for Patterned Data

โžค As you can see, Excel has recognized the data pattern and omitted all numbers for each subsequent cell in the column.

Use the Flash Fill Feature for Patterned Data

โžค If some of your cells have the correct text strings while others remain unchanged, you can fix this by taking another neighboring cell with uncorrected data and typing the correct text only without any numbers. Click Enter on your keyboard, and the remaining data will be sorted correctly.


2

Manually Remove Numbers with Find & Replace Tool

This method works when there are only common digits present in your dataset. To give you an example, we’ve changed the previous data to keep only the digits 1 and 0. For suchย  less complex and small data sets, you can manually remove each number with the Find & Replace tool. Here’s how you can approach:

โžค Select the specific columns containing numeric data you want to change and use the shortcut  CTRL  +  H  to open the Find and Replace dialog box.
โžค Or, you can click on the Home tab. Press Find & Select from the Editing group on the top right corner of your screen.

Manually Remove Numbers with Find & Replace Tool

โžค In the Find and Replace dialog box, you need to type the exact digits you want to remove in the Find What box. We entered 10 in the box to get rid of all the numbers at once.
โžค Keep the Replace With box blank and click on Replace All.

Manually Remove Numbers with Find & Replace Tool

โžค In the following picture, Excel has removed all the zeros from our chosen column. If your data doesnโ€™t have common digits, you need to repeat the process for all the remaining consecutive numbers from 1 to 9 putting only one digit at a time in the Find What box.

Manually Remove Numbers with Find & Replace Tool


3

Replace Numbers with the SUBSTITUTE Function

Using the SUBSTITUTE function to replace all the digits with an empty string is a clever way to strip out numbers from texts. Here’s how to do it:

โžค Choose the adjacent cell to your first text string and type the following formula:

=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(D2,”0″,””),”1″,””),”2″,””),”3″,””),”4″,””),”5″,””),”6″,””),”7″,””),”8″,””),”9″,””)

โžค Replace D2 with the cell containing your text. Finally, choose the arrow icon and drag it until the last cell of the column containing your data.

Explanation
Here, 10 SUBSTITUTE functions are nested to remove each digit from 0 to 9.

The first function replaces 0 with an empty string, and the next one replaces 1 with an empty string within the result of the first. And this pattern continues for the remaining digits.


4

Apply Excel Formula with TEXTJOIN, ISNONTEXT, and MID Functions

With this formula, we’ll use several functions to extract each character from a text string and then join only the non-numeric ones. Let’s proceed to the steps:

โžค In the neighboring cell of your preferred data cell, enter this formula:

=TEXTJOIN(“”,TRUE,IF(ISERR(MID(A1,SEQUENCE(LEN(A1)),1)+0),MID(A1,SEQUENCE(LEN(A1)),1),””))

โžค Instead of A1, type the actual reference of your data cell. Click on the arrow sign and drag it to select all the cells you want to convert.

Apply Excel Formula with TEXTJOIN, ISNONTEXT, and MID Functions

Explanation
With LEN and SEQUENCE functions, we get the text string length and create an array of numbers from 1 to the length of the string. The MID function extracts each character one by one into an array. By adding zero, the formula attempts to convert each character to a number. As texts can't be converted into numbers, we use the IF(ISERR(...) function to bypass the error and replace numbers with empty strings. Finally, TEXTJOIN combines all kept characters back into a single string.

5

REGEXREPLACE Function for Excel 365

If you have Excel 365 or even a newer version featuring the REGEXREPLACE function, separating numbers from texts will take only a few clicks. Here’s how:

โžค Enter the following formula in your preferred cell and drag it down along the column with mixed alphanumeric data.

=REGEXREPLACE(A1,”[0-9]+”,””)

โžค Replace Cell A1 with the cell number of your preferred text string. This function locates all the digits from 0 to 9 expres to and replaces all occurrences of these digits with an empty string (“”).

REGEXREPLACE Function for Excel 365


6

Enter an Array Formula to Extract Text

With proper knowledge of how Excel formulas work, one can create a detailed formula to filter texts from mixed alphanumeric data. Here, we’ll use such an array formula that you can simply copy and paste to quickly get the job done. Follow the steps given below:

โžค Select the adjacent cell to the first text string of the column you want to convert. Start typing the following formula and press Enter:

=CONCAT(FILTER(MID(D2,SEQUENCE(LEN(D2)),1),ISERROR(MID(D2,SEQUENCE(LEN(D2)),1)*1)))

โžค Always use the exact cell reference of your chosen column cell in the formula instead of D2.

Enter an Array Formula to Extract Text

โžค Click and drag the formula until the last row of your data to remove all the digits from your data sets.

Enter an Array Formula to Extract Text

Explanation
In this formula, LEN(A1) function counts how many characters are in cell A1, While SEQUENCE creates a sequence of numbers for every character in cell A1. MID(...)*1 is used to take each character from the cell and multiply them by 1. As texts can't be multiplied by 1, they result in a #VALUE error. Therefore, we bring ISERROR to check which multiplying characters are resulting in an error.

Finally, we use a FILTER that keeps only the characters where ISERROR is TRUE (text in this case). CONCAT is used to join our filtered texts in a string.


7

Remove Digits Using the Power Query Feature

Before getting into more complicated formulas, let’s try the Power Query feature. It’s a powerful transformation feature that allows you to customize worksheet columns in your preferred ways. Start by following these steps:

โžค Drag and select the column you want to transform and go to the Data tab. Navigate to the Get & Transform Data group and select Get Data. Click on From Other Sources and choose From Table/Range.

Remove Digits Using the Power Query Feature

โžค As the Power Query Editor arrives, press on the Add Column tab and select Custom Column.
โžค In the New Column Name field, add a name if you like. Proceed to the Custom Column Formula box and type either of the following formulas

  • Remove([ColumnHeading], {“0”..”9″})
  • Select([ColumnHeading], {“A”..”Z”, “a”..”z”})

โžค You must replace ColumnHeading with the actual name of the column you’re extracting text from. As you can see in the picture, we replaced ColumnHeading with Column without Numbers.

Remove Digits Using the Power Query Feature

โžค To avoid creating a copy of the source column, right-click on the source column and select Remove.

Remove Digits Using the Power Query Feature

โžค Go to File and choose Close & Load Toโ€ฆ

Remove Digits Using the Power Query Feature

โžค From the Import Data dialog box, select Table and Existing Worksheet. Use the arrow sign to select a new column in your worksheet where you want to store the converted data.

Remove Digits Using the Power Query Feature

โžค Finally, click Ok to create a new column with only texts as shown below:


8

Eliminate Numbers with VBA Coding

With VBA macros, you can remove numbers from longer and more complex data sets. However, you need to enter a custom function first. So, follow the steps given below:

โžค Open the VBA Editor by pressing the keyboard shortcut  Alt  +  F11 . You can also go to the Developer tab and select Visual Basic.

Eliminate Numbers with VBA Coding

โžค If you don’t have the Developer tab on the main ribbon, go to the File tab, click on More, and select Options.

Eliminate Numbers with VBA Coding

โžค Go to Customize Ribbon and check the Developer box from the Main Tabs group. Click Ok.

Eliminate Numbers with VBA Coding

โžค In the VBA editor, go to Insert, select Module, and paste either of the following codes:

Eliminate Numbers with VBA Coding

To Keep Texts Only and Remove the Numbers Completely

Sub KeepOnlyText()
' This macro removes all numeric characters from the selected cell(s),
' leaving only the text.ย  It handles spaces and other non-numeric characters.
ย  Dim cell As Range
ย  Dim inputRange As Range
ย  Dim textString As String
ย  Dim i As Long
ย  Dim character As String
ย  ' Get the user's input range.ย  Error handling is important.
ย  On Error Resume Next
ย  Set inputRange = Application.InputBox( _
ย ย ย  Prompt:="Select the range of cells to process (text will be kept, numbers removed):", _
ย ย ย  Title:="Select Range", _
ย ย ย  Type:=8) ' Type 8 for range selection
ย  On Error GoTo 0
ย  ' Exit if the user cancelled.
ย  If inputRange Is Nothing Then
ย ย ย  MsgBox "No range was selected. Exiting.", vbExclamation
ย ย ย  Exit Sub
ย  End If
ย  ' Disable screen updating for efficiency.
ย  Application.ScreenUpdating = False
ย  ' Loop through each cell in the selected range.
ย  For Each cell In inputRange
ย ย ย  textString = "" ' Reset the string for each cell.
ย ย ย  ' Loop through each character in the cell's value.
ย ย ย  For i = 1 To Len(cell.Value)
ย ย ย ย ย  character = Mid(cell.Value, i, 1)
ย ย ย ย ย  ' Check if the character is NOT numeric.ย  If it's not, keep it.
ย ย ย ย ย  If Not IsNumeric(character) Then
ย ย ย ย ย ย ย  textString = textString & character
ย ย ย ย ย  End If
ย ย ย  Next i
ย ย ย  ' Put the resulting text back into the cell.
ย ย ย  cell.Value = textString
ย  Next cell
ย  ' Re-enable screen updating.
ย  Application.ScreenUpdating = True
ย  ' Inform the user that the process is complete.
ย  MsgBox "Numbers removed, text kept!", vbInformation, "Done!"
End Sub

To Put Text and Numbers in Separate Columns

Sub SeparateTextAndNumbers()
ย  ' This macro separates text and numbers from a selected range of cells.
ย  ' It places the text in the adjacent column to the right, and the numbers
ย  ' in the column next to that.
ย  Dim cell As Range
ย  Dim inputRange As Rangeย  ' Changed variable name for clarity
ย  Dim textString As String
ย  Dim numberString As String
ย  Dim i As Long
ย  Dim character As String
ย  Dim lastRow As Long
ย  ' Error handling in case no range is selected.
ย  On Error Resume Next
ย  Set inputRange = Application.InputBox( _
ย ย ย  Prompt:="Select the range of cells to process:", _
ย ย ย  Title:="Select Range", _
ย ย ย  Type:=8) ' Type 8 is for selecting a range
ย  On Error GoTo 0
ย  ' Exit if no range was selected
ย  If inputRange Is Nothing Then
ย ย ย  MsgBox "No range was selected.ย  Exiting.", vbExclamation
ย ย ย  Exit Sub
ย  End If
ย  ' Disable screen updating to speed up processing
ย  Application.ScreenUpdating = False
ย  ' Loop through each cell in the selected range
ย  For Each cell In inputRange
ย ย ย  textString = ""
ย ย ย  numberString = ""
ย ย ย  ' Loop through each character in the cell's value
ย ย ย  For i = 1 To Len(cell.Value)
ย ย ย ย ย  character = Mid(cell.Value, i, 1) ' Get one character at a time
ย ย ย ย ย  ' Check if the character is a number (and not a space).
ย ย ย ย ย  'ย  IsNumeric(" ") returns True, so we exclude spaces.
ย ย ย ย ย  If IsNumeric(character) And character <> " " Then
ย ย ย ย ย ย  ย numberString = numberString & character
ย ย ย ย ย  Else
ย ย ย ย ย ย ย  textString = textString & character
ย ย ย ย ย  End If
ย ย ย  Next i ' Go to the next character
ย ย ย  ' Write the results to the adjacent cells.ย  Using Offset is good.
ย ย ย  cell.Offset(0, 1).Value = Trim(textString)ย ย ย ย ย  ' Text to the right
ย ย ย  cell.Offset(0, 2).Value = numberStringย ย ย  ' Numbers to the right of the text
ย  Next cell ' Go to the next cell in the selected range
ย  ' Re-enable screen updating
ย  Application.ScreenUpdating = True
ย  ' Show a message when done.
ย  MsgBox "Text and numbers separated successfully!", vbInformation, "Done!"
End Sub

โžค Click on the Run tab and select Run Sub/UserForm.

Eliminate Numbers with VBA Coding

โžค Now, in the new dialog box, you need to type the column range where you want to apply the VBA macro.

โžค To save the changes, go to File and go to Save As. Navigate the location where you want to save the workbook. In the Save as Type box, choose Excel Macro-Enabled Workbook and press Save.

Eliminate Numbers with VBA Coding

โžค Hereโ€™s the final result for the second code:


Downloadable Resources

Get our practice workbook or necessary files that we have worked with to prepare this article.

Remove Numbers from a Cell.zip


Frequently Asked Questions

How do I remove 3 digits from the left in Excel?

You can use the RIGHT and LEN functions to create a formula that removes 3 digits from the left side of a text string. Select the cell and type:

=RIGHT(A1, LEN(A1)-3)

If you want to remove more than 3 digits put the exact number of digits instead of 3 in the formula. Replace the RIGHT function with LEFT to remove 3 digits from the left side of the cell.

How to take only numbers from a cell in Excel?

Select your preferred column and go to the Data tab >> Get Data >> From Other Sources >> From Table/Range. Use the Power Query feature to create a custom column and enter the formula:

Text.Remove([ColumnHeading], {“A”..”Z”, “a”..”z”})

How to remove delimited numbers from text?

If the digits in your columns are separated by delimiters such as comma, tab, semicolon, plus sign, space, or hyphen, use the Text to Columns feature you can find on the Data tab. As the Text Import Wizard box arrives, click on Delimited and choose the right delimiter from the options. If the delimiter of your data feature isn’t in the list, manually type it in the Other box. Finally, choose General and click Finish.


Wrapping Up

All the methods we’ve mentioned to separate numbers from text are roundabout ways that might take several trial and error. If your data sheet is long and complex, use the array formulas or VBA macros for accurate results.

To finish the task easily in just a few clicks, the Flash Fill feature is preferable for small data sets. There are other more complicated ways to do the task such as using third-party add-ins. However, these can be harmful for your device.

Facebook
X
LinkedIn
WhatsApp
Picture of Sohana Chowdhury

Sohana Chowdhury

With 3 years of experience in Excel and Google Sheets, Sohana Chowdhury specializes in turning messy data into organized insights through VBA, Power Query, and advanced formulas. She also brings a strong editorial background as a profound writer at Livingston Research, where her work is grounded in sharp research and analytical rigor. Whether she is designing a dynamic dashboard or delivering high-level content, Sohana ensures precision, efficiency, and expert analysis in every project.
We will be happy to hear your thoughts

      Leave a reply


      Excel Insider
      Logo