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])….
Related Posts

Find and Replace Multiple Values

This post will guide you how to find and replace multiple values at once with VBA macro or using formula  in Excel. How do I make multiple find and replace in Excel. Suppose that you have a few cells containing ...

Extract Last Two Words From Multiple Cells

Just assume that you have a few cells containing values/words and you want to extract the last two words from each cell into another separate cell; then you might think that it's not a big deal; because you would prefer ...

Extract Multiple Lines From A Cell

Suppose that you have listed some text in a single cell which is separated by the line break(you can do it by pressing ALT + ENTER after entering the text), and now you want to extract multiple lines of text ...

How to Remove All Asterisk Characters from Cells in Excel

Sometimes when we opening an excel spreadsheet to check data, we may notice that there are some asterisks exist in texts for security or other reasons. If you feel these special characters are invalid you can remove them from cells. ...

How to Convert Date Format from Dot MM.DD.YYYY to Slash MM/DD/YYYY in Excel

We often enter dates in excel tables, and we can enter current date by quickly press ‘Ctrl+;’ simultaneously. If in some cases we enter a date format that is not what we want, we have to switch the date format ...

Sidebar