3 quick ways to remove extra spaces between words or delete all spaces from Excel cells. You can use trim formula, Excel Find & replace or special Excel add-in to clean up cells' content.
When you paste data from an external source to an Excel spreadsheet (plain text reports, numbers from web pages, etc.), you are likely to get extra spaces along with important data. There can be leading and trailing spaces, several blanks between words and thousand separators for numbers.
Consequently, your table looks disorderly and becomes difficult to use. It may be a challenge to find a customer in the Name column since you search for "John Doe" which has no excess spaces between the names while the way it looks in your table is "John Doe". Or numbers can't be summed up, and again extra blanks are the ones to blame.
In this article you'll find how to clean up your data.
Trim blanks between words to 1, remove trailing / leading spaces
For example, you have a table with 2 columns. In the column Name, the first cell contains "John Doe" written correctly without excess spaces. All other cells have extra blanks between the first and the last names. At the same time these cells have irrelevant blanks before and after the full names known as leading and trailing spaces. The second column is called Length and shows the number of symbols in each name:
Excel has the Trim formula to use for deleting extra spaces from text. Below you can find the steps showing how to use this option: Now pick the first cell in the original column and press Shift + F10 or the menu button That's it! We deleted all excess blanks with the help of the formula trim(). Unfortunately, it's a bit time-consuming, especially if your spreadsheet is rather big.
Note. If after using the formula you still see extra spaces (the last cell on the screenshot), please have a look at If the TRIM function doesn't work. This option needs fewer steps, but allows only deleting excess spaces between words. Leading and trailing spaces will also be trimmed to 1, but will not be removed. If you often import data to Excel from external sources and spend much time polishing up your tables, the Trim Spaces tool will clean data imported from the web or any other external source. It removes leading and trailing spaces, excess blanks between words, non-breaking spaces, and line breaks. To remove all extra spaces in your worksheet, including excess paces between words, this is what you need to do: Isn't it faster than with the two previous tips? If you always deal with data processing, this tool will save you hours of precious time.
Use the Trim formula to remove extra spaces
=TRIM(A2)
. Then just press V.
Using Find & Replace to remove extra spaces between words
3 clicks to neat data with Trim Spaces tool
Remove all spaces between numbers
Suppose, you have a workbook with numbers where the digits (thousands, millions, billions) are separated with spaces. Thus Excel sees numbers as text and no math operation can be performed.
The easiest way to get rid of excess spaces is using the standard Excel Find & Replace option:
- Press Ctrl + Space to select all cells in a column.
- Press Ctrl + H to open the "Find & Replace" dialog box.
- Press Space bar in the Find What field and make sure the "Replace with" field is empty.
- Click on the "Replace all" button, and then press Ok. Voila! All spaces are removed.
Using formula to remove all spaces
You may need to delete all blanks, like in a formula chain. To do this, you can create a helper column and enter the formula: =SUBSTITUTE(A1," ","")
Here A1 is the first cell of the column with numbers or words where all spaces must be deleted.
Then follow the steps from the part using formula to remove extra spaces between words to 1
Video: how to remove spaces in Excel
18 comments
If you have a phone number in format 0X XXX XXX XXX, how do you remove spaces without dropping the zero at the start?
Hello! To remove spaces, you can use the SUBSTITUTE function. To leave a leading zero, use the TEXT function and these guidelines: How to add leading zeros in Excel with the TEXT function.
=SUBSTITUTE(A1," ","")
=TEXT(SUBSTITUTE(A1," ",""),"00000000000")
I have copied a table from outlook & there having some junk characters which are looks like space but not space actually.
All ways for clean the value column are done, number format also applied but still calculation not possible.
can you please support for the problem.
Hi! I hope that in this article you will find the answer: How to remove spaces in Excel - leading, trailing, non-breaking.
I have an excel sheet which is received from my bank but amount column having spaces in start of the numbers i put the formula of SUBTITUTE and TRIM but cannot sum of total value of amount by selecting of column.
Hello!
To convert text in the form of a number with a space to a regular number, use the VALUE function, as well as other methods described in this tutorial: How to convert text to number with formula and other ways in Excel.
12132637
12132632
12132431
12130179
how can I delete/remove these spaces, that were copied from Outlook.
I have applied all aforementioned methods however could not get thru.
Hi!
You can find the examples and detailed instructions here: How to remove spaces in Excel - leading, trailing, non-breaking.
when i remove a space in a phone number e.g 087 9876543 i am getting 879876543- the space is gone but so is the initial 0. any fix
Hello!
You didn't say how you removed the space from the number. If you use the SUBSTITUTE function (see example above), the result will be the text "0879876543".
The same result is obtained using Ultimate Suite for Excel: Ablebits Data - Remove Characters.
This tool is available as a part of our Ultimate Suite for Excel that you can install in a trial mode and use for free: https://www.ablebits.com/files/get.php?addin=xl-suite&f=free-trial
How can I trim spaces from "selected cells" (not an entire column) - I have a spreadsheet where I only want to trim spaces from selected cells, within one column, but not all. Is there a way of selecting the cells, by using CTRL + select, etc., without removing spaces from non-selected cells?
Hello!
We have a tool that can solve your task in a couple of clicks.
The way you are talking about is possible if you use Ablebits Data - Trim Spaces.
This tool is available as a part of our Ultimate Suite for Excel that you can install in a trial mode and use for free: https://www.ablebits.com/files/get.php?addin=xl-suite&f=free-trial
Your way to remove spaces is not possible with standard Excel tools. If you are using the TRIM function that only works on one cell, then apply it only to the desired cells. If you use "Find and Replace", then with the button Find Next, skip individual cells.
I have this information in one cell (column A)
VALLEJO - A52
I need to delete - A52 from column A and copy the A52 into column B.
So this is the final product
A52 (Column B) Vallejo (Column A)
Hello Jeanette!
How to split text into cells - read here.
We have a tool that can solve your task in a couple of clicks: Ablebits Data - Split text.
This tool is available as a part of our Ultimate Suite for Excel that you can install in a trial mode and use for free: https://www.ablebits.com/files/get.php?addin=xl-suite&f=free-trial
In my excel i don't have Ablebits Data option please suggest how to get it.
Hello, Girish,
Please note that the Ablebits tab will appear in your Excel Ribbon once you install our software. If you want to use our Trim Spaces add-in to remove extra spaces from your worksheet, feel free to install a fully functional trial version of Ablebits Ultimate Suite for Excel and see if the tools work for you.
Dear All,
Kindly help me into provide a formula for the below case.
I need to delete space after number.
581086
581086
581086
Dear Ahamed,
Thank you for your question.
Please note that you can remove extra spaces using the Trim formula. However, our Trim Spaces add-in can help you solve this task faster and easier. It is available as a part of our Text Toolkit that contains 8 useful add-ins to manage text data in Excel (remove extra spaces, substrings and non-printable characters, change case, split cells, etc.).