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
Awesome!!
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.
How can I get rid of leading and trailing spaces in a cell with multiple lines of text? The TRIM function works for a cell with just one line of text
Hi!
I could not repeat your problem. The TRIM function works in a cell with multiple lines of text. Maybe this article will be helpful: Excel TRIM function - quick way to remove extra spaces.
Thank you so much!! Your tips saved me time from having to update, and I count...5636 rows of data!!!!! That would have taken me days to update.
SO much Thanks with Respect and Gratitude
Thanks a lot. it was a big help.
You are a god whoever made this page; thank you so much you saved me so much time with space trimming
I am looking for some help. I have a column of numbers with a ' before each number, however, there are a bunch of them that have what looks like a space and it is not tight against the left edge. I have tried the Trim function, but that does nor work. I am not sure as to how to fix this.
Thank you
Hello!
I'm assuming you want to convert text to numbers. You can use a math operation or another method described in this article. If this does not suit you, please explain what you want to do.
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.
Thanks, 3rd option im use
Thank you Alexander, very helpful.
How to add VLOOKUP in google spreadsheet
Hello Suhail,
Please see this tutorial: Google Sheets VLOOKUP with examples
60110 - Payroll Expense, 60120 - Payroll Taxes, 60130 - Overtime Wages, 60140 - Vehicle Allowances, 60150 - Medical Insurance, 60160 - Other Fringe Benefits, 60170 - Retirement Contribution, 60180 - Savings Contribution, 60190 - Vacation Expense
Above is the data that I am looking at. I just want to remove Payroll Expense out of it but keep everything else. How do I do that in excel?
Hello!
If you want to remove values with specific words, you can use the Excel filter. If this is not what you wanted, please describe the problem in more detail.
Thanks for sharing such a useful information!
HOW CAN I REMOVE SPACE AFTER TEXT i,e "ADAPTER,3/8NPTX1/4NPT
"
Hi!
The answer to your question can be found in this article: Excel TRIM function - quick way to remove extra spaces.
That's great, it works. Thanks
Thank you for the great tips!
"UPI/1336 2071/P
ayment from Ph/702027
2314@ybl/ TJ"
I have such issue. I have done copy paste fron excel cell that was only in one cell. but as I copied and paste here it has come into three lines. What shoul I do???
Hello!
The text in a cell can be written on multiple lines. Perhaps you need instructions – 3 ways to remove carriage returns in Excel.
Hi,
If a have a column with Surnames, a space and just the initial of their First name.
(i.e. as show below.)
How do i remove the space and the letter for the whole list? Or do i have to do it individually?
Bloggs J
Thomas M
William T
Jones A
dear sir,
i need a formula for space between two text.
eg: Tableofcontents = Table of contents.
Hi!
Use text functions, such as CONCATENATE function:
=CONCATENATE(LEFT(A2,5)," ",MID(A2,6,2)," ",MID(A2,8,20))
=CONCAT(LEFT(A2,5)," ",MID(A2,6,2)," ",MID(A2,8,20))
=TEXTJOIN(" ",,LEFT(A2,5),MID(A2,6,2),MID(A2,8,20))
Hi, i have copied a bunch of data from a table in a website.
however, excel does not recognize this data as numbers, but rather as text (it also automatically sorts the text on the left side of the cell). changing the cell to 'general' or 'number' does not do anything. i can not make graphs off this data since excel does not recognize it as data.
I just figured out this is because all the datapoints have a space behind their value, so for example: "3,7 " instead of "3,7". when i remove this extra space, the datapoint alligns on the right side of the cell and is recognized as a number again.
however, I can not seem to remove the extra spaces using the methods described on this website, any ideas?
Hello!
If you remove the space, the number is still written as text. I recommend reading this guide: Convert text to number with a formula.
This should solve your task.
Hello,
I have the same problem as S. The data was copied from a website and the numbers copied as text as: " 365,65" with extra space added in front of the numbers but the extra spaces cannot be removed with any of the suggestions above (neither trim nor replace seem to work). Any ideas how to remove them another way? There's way too many numbers to do it manually.
Thank you.
Kind regards.
Hello!
If you need to convert text to a number, I think one of these methods will work for you. Read this article - How to convert text to number in Excel.