Suppose the data is in the B column, write in the C column the formula:
=SUBSTITUTE(B1," ","")
Copy&Paste the formula in the whole C column.
edit: using commas or semicolons as parameters separator depends on your regional settings (I have to use the semicolons). This is weird I think. Thanks to @tocallaghan and @pablete for pointing this out.
Answer from vulkanino on Stack OverflowSuppose the data is in the B column, write in the C column the formula:
=SUBSTITUTE(B1," ","")
Copy&Paste the formula in the whole C column.
edit: using commas or semicolons as parameters separator depends on your regional settings (I have to use the semicolons). This is weird I think. Thanks to @tocallaghan and @pablete for pointing this out.
It is SUBSTITUTE(B1," ",""), not REPLACE(xx;xx;xx).
I copy text from documents into Excel and when they come through, there will be anywhere between 2 and 10 spaces between words. Is there anything I can do to get rid of those?
Thanks for the help!
Is there a way to remove all spaces between text string?
Remove Space Between Numbers in Excel
Remove leading and trailing spaces keeping multiple spaces between words intact
Cannot remove invisible spaces between words
Hi Wilson,
I am working on an excel that requires me to shorten text strings by removing spaces. I use the TRIM but it still leaves a regular blank between words. What I want to do is to make " apple orange lemon" become " appleorangelemon". I wonder if there is a way to do this so I can save my time.
- Select data of interest
- Ctrl+H to open the Find & Replace dialog
- Enter a single space in the Find what box
- Delete any content fromReplace with box
- Replace all
===
Regards,
Norman
Hi Wilson,
Thank you so much. Your method works like a magic.
You are very welcome!
Thank you for the kind feedback.
===
Regards,
Norman
If trim isn’t working for you, why not do a simple find and replace of the “space” character. That may well work for you.
I know this is a very basic function but even after searches and a YouTube video, I can’t seem to find how to do this and funny, I’ve done it before…
I need to remove the spaces in a row…I’ve tried following examples of the TRIM function but it just doesn’t seem to be working correctly…
Here’s what the numbers look like:

I have about 280 of these and only need the spaces removed from those numbers all in the same column.
Thanks…
I was able to reproduce the behavior you are seeing (also in Excel 2007). I can't find a way to get rid of the extra space once it's there, but I found that if you reverse your steps and apply the Text Wrap in a cell prior to entering your text, you will not get the extra blank line.
I had the same problem just before I've typed this. And here is what I've found.
When you press wrap text the cells height is automatically adjusted. Also its height is not calculated as we expected. If there is very little space left on the last row of the text, Excel decides that the cell needs one more row... even if there is not a single letter on it.
If you get the cell's width a little wider, the automatic cell height adjustment removes the extra line.
I pulled table data from a pdf using Power Query. Everything looked good, but I noticed that when I sent it back to Excel there were double spaces in between the first, middle, and last names, but they are not normal spaces. I looked it up and they are unicode characters.
I thought they were non-breaking spaces, but using Replace.Values to find and replace #(00A0) didn't work. I set the column datatype to Text and I still got the same result. I added the special character options to find and replace (#(cr), #(lf), and #(tab)), but none of those worked, either. I tried to split the column using space as the delimiter, but I only returned a column of "null" values.
If I use Clean(), it works, but it crams everything together -- which is not what I want. I noticed that if I open the spreadsheet in Googlesheets, all of those spaces show as tiny square boxes, but I can't see them at all in Excel.
Outside of manually adjusting the spacing in each cell, is there an easier way to accomplish removing the invisible spaces?