How to Remove Non-Numeric Characters – Excel & Google Sheets

Written by

Editorial Team

Reviewed by

Steve Rynearson

Last updated on August 15, 2023
Download Example Workbook

Download the example workbook

This tutorial will demonstrate you how to remove non-numeric characters from cells in Excel and Google Sheet.

Remove non Numeric Characters Main Funct...

Remove Non-Numeric Characters

Note: The functions mentioned in this article were introduced in Excel 2016. If you have an older version of Excel, please see this article: Find & Extract Number from String.

With the TEXTJOIN, SEQUENCE, MID, and IFERROR Functions you can remove all non-numeric characters:

=TEXTJOIN("",TRUE,IFERROR(MID(B3,SEQUENCE(LEN(B3)),1)+0,""))

remove non numeric characters 00

Let’s see how this formula works.

The SEQUENCE and LEN Functions return an array of numbers starting from 1 to the length of our alphanumerical string. In our case it will be {1,2,3,4,5,6,7,8,9,10,11,12,13}.

=TEXTJOIN("",TRUE,IFERROR(MID(B3,{1;2;3;4;5;6;7;8;9;10;11;12;13},1)+0,""))

remove non numeric characters 00 01

The MID Function returns the characters corresponding to the positions from our numerical array above:

=TEXTJOIN("",TRUE,IFERROR({"1";"3";"M";"o";"n";"d";"a";"y";"0";"1";"D";"a";"y"}+0,""))

Adding 0 to each item in the array will cause an error if the value is text. Then the IFERROR Function will replace the error with a blank string, leaving only the numerical values:

=TEXTJOIN("",TRUE,{1;3;"";"";"";"";"";"";0;1;"";"";""})

Last, the TEXTJOIN Function returns only the numerical characters.

remove non numeric characters 00

Instead of using the SEQUENCE function, you can achieve the same goal by combining the TEXTJOIN function with the LEN, INDIRECT, ROW, MID and IFERROR functions.

=TEXTJOIN("",TRUE,IFERROR((MID(B3,ROW(INDIRECT("1:"&LEN(B3))),1)*1),""))

remove non numeric characters 02

 

How to Remove Non-Numeric Characters in Google Sheets

All the examples explained above work the same in Google sheets as they do in Excel.

remove non numeric characters Google Function

AI Formula Generator

Try for Free

Excel Practice Worksheet

practice excel worksheet

Practice Excel functions and formulas with our 100% free practice worksheets!

  • Automatically Graded Exercises
  • Learn Excel, Inside Excel!

Free Download

Return to Excel Formulas List