Formula – Remove Unwanted Characters – Excel

Written by

Editorial Team

Reviewed by

Steve Rynearson

Last updated on February 8, 2023
Download Example Workbook

Download the example workbook

This tutorial will demonstrate how to remove unwanted character(s) from a cell in Excel.

remove unwanted characters

 

Remove Unwanted Characters

If you want to remove unwanted characters from a cell, use the SUBSTITUTE Function to replace the unwanted character with blank text (“”). Here we will remove all spaces from a cell:

=SUBSTITUTE(B3," ","")

remove unwanted Characters 01

This example will replace an exclamation mark (!):

=SUBSTITUTE(B3,"!","")

remove unwanted characters 02

Nested SUBSTITUTE Functions

With the SUBSTITUTE Function, as shown in the examples above, it’s only possible to remove one text string (or character) at a time. But you can remove multiple unwanted characters at once by nesting SUBSTITUTE Functions.

=SUBSTITUTE(SUBSTITUTE(B3,"#","-"),"--","-")

remove unwanted characters 03

This example removes any the pound signs “#” or double dashes “–” and replaces them with a single dash “-“.

Remove Unwanted Characters in Google Sheets

These formulas work exactly the same in Google Sheets as in Excel.

remove unwanted characters google sheets

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