How to remove all spaces between numbers or words

This post will describe two quick ways to remove all space characters between numbers or words in excel. How to remove unwanted spaces from cells in a select range of cells in Excel.

Assuming that you have a list of data with text string and numbers in one cell, and you want to remove all spaces between text character and numbers in those cells. You can use Excel Find & replace or SUBSTITUTE function. This post will guide you how to use those two ways to remove all spaces.

Remove all spaces using Find and Replace option

The below steps will teach you how to remove all spaces between characters and numbers using the standard Excel Find & Replace option:

Step 1# select the range of cells that you want to remove spaces

remove spaces 1

Step 2# go to “Home” Tab, then click “Find & Select” -> “Replace…”, then the Find and Replace dialog box will appear.  Or press “CTRL+H” shortcut to open the “Find and Replace” dialog box.

remove spaces 1

Step 3# press the space bar in the Find what text box, and do not input any character in the “replace with” box. Then click Replace All button.  Click “OK’ button.

remove spaces3

You will see that how many spaces have been removed from the above screenshot.

Step 4# let’s see the last result:

remove spaces4

Remove all spaces using SUBSTITUTE function

You may want to remove all space characters between numbers or characters using an excel formula, then you can use the SUBSTITUTE function to create a formula as follows:

=SUBSTITUTE(A1," ", "")

You just need to enter the above formula in another cell, such as: B1, then press Enter.

remove spaces5

Then you can select cell B1, then drag the AutoFill Handle down the other cell that you want to apply this formula.

remove spaces6

Related Formulas

Related Functions

  • Excel Substitute function
    The Excel SUBSTITUTE function replaces a new text string for an old text string in a text string.The syntax of the SUBSTITUTE function is as below:= SUBSTITUTE  (text, old_text, new_text,[instance_num])….

Leave a Reply