How to strip numeric characters from cell in Excel

To remove numeric characters from a text string, you can try this experimental formula based on the TEXTJOIN function, new in Excel 2016.




In the example shown, the formula in C5 is:


Note: this is an array formula and must be entered with control + shift + enter.

How this formula works

Working from the inside out, the MID formula is used to extract the text in B5, one character at a time.  The key is the ROW/INDIRECT piece:


which spins up an array containing 100 numbers like this:

Also See:   Smaller of two values in Excel


Note: 100 represents the maximum characters to process. Change to suit your data.

This array goes into the MID function as the start_num argument. For num_chars, we use 1.

The MID function returns an array like this:

{“3″;”4″;”6″;”5″;”3″;” “;”J”;”i”;”m”;” “;”M”;


(extra items in the array removed for readability)

To this array, we add zero. This is a simple trick that forces Excel to try and coerce text to a number. Numeric text values like “1”,”2″,”3″,”4″ etc. are converted, while non-numeric values fail and throw a #VALUE error. We use the IF and ISERR functions to catch these errors. If get an error we know we have a non-numeric character, so we use another MIN function to bring it into our array:


If don’t get an error, we know we have a number, so we just insert an empty string (“”) into the array.

Also See:   Extract middle name from full name -- Manipulating NAMES in Excel

The final array result goes into the TEXTJOIN function as the text1 argument. For delimiter, we use an empty string (“”) and for ignore_empty we supply TRUE. TEXTJOIN then concatenates all non-empty values in the array and returns the result.

More precise array length

If it bothers you to hard-code a value like 100 into INDIRECT, you can use the LEN function inside INDIRECT to more intelligently process only the actually number of characters in the cell.


Removing extra space

When you strip numeric characters, you may have extra space characters left over. To strip leading and trailing spaces, and normalize spaces between words, you can wrap the formula shown on this page inside the TRIM function:


Leave a Reply

Your email address will not be published. Required fields are marked *