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 . Then just press V.
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)
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
265 comments
Thanks a lot bro.. it was helpful..
it was nice learning new tips but help on how to delect the first six alphabet fro these GAP GRE YTR 453 VM TO YTR453VM ON A ARRAY OF MULTIPLE DATA
Perfecto
how to remove multiple space before numbers in excel. 100 cells contain different space.
How to remove left space for multiple line in one cell
----------
John Doe
John Doe
John Doe
----------
Thank you...
Super............
Too good buddy..keep up
Oops!! i was just checking for validation. Anyways good Information in here for trimming!!
thanks it's really nice like magic
I have 12 Mar 2004 but i need 12-Mar-04.
Please help
Change the cell format
Hi,
1st Replace Space to (-),
then change the date format.
please let me know how to make data base on excel?????
Thanks alot ur a life saver
Thanks.
I have a txt dataset that seems to be seperated with tabs but actually nodes are seperated with space character. I brought it into an excel file and saved it as an csv file then I converted it to an arff file and now I'm openning it in weka but it gives an error to me and say "can not be recognized as an arff file".I don't know what the problem is!
I am not able to determine the cause of the error without seeing your data. If you can send me your file at alex@ablebits.com., I will try to help.
Didnt work for me too, however found the right way. Select and highlight the space you want to get rid of. Copy this space and select the find and replace. Paste this space in find and replace with nothing. I guess it wasnt a space in the first place. Whatever it was you now find it by copying whatever it was. Hope it works for you.
worked a treat! thanks
Thanks so much for your help. A simple solution to a very frustrating problem.
Thanks that worked for me!
Yay, great solution!
Thanks a lot Joel!!!
Thanks for the solution
This worked for me.
Thanks
Thanks a lot. It worked out for me.
Thank you, useful tips
we can also use text to column function.
You just insert two or three columns after that data and select the data and go to data (tools)and select text to column delimited and click on space option and other character if available in that data and after that click next button and now you will be able to remove extra spaces in that data.
Thanks
Pankaj Parti (india)
Thank you for your comment! Your solution works fine, though it may take just a little bit more time.
how to remove spaces after cheque No.
Very helpful. Many thanks
Thanks! a lot remind me
thanks loads!!
Perfect its wonderful
If you copy numbers from a web page, or Microsoft Outlook, you get leading Blank Spaces and then your numbers will Not sum. You have to remove the leading blank spaces for the numbers to sum as numbers should. Go to Data-> Text to Column->Fixed Width and verify that a line appears PRIOR to the copied number data. Then go to "NEXT" and make sure the tab that says, "General", is selected Then Click "FINISH", and all your Non-summing numbers will now sum properly.