ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   how to erase all spaces in text cell? (https://www.excelbanter.com/excel-worksheet-functions/89905-how-erase-all-spaces-text-cell.html)

D

how to erase all spaces in text cell?
 
With TRIM function it is possible to erase only double spaces but I need to
erase all spaces in a text cell.
Do I have to use VBA funaction?
Tnx in advance.



Miguel Zapico

how to erase all spaces in text cell?
 
You can use a combination of CLEAN and SUBSTITUTE, something like:
=CLEAN(SUBSTITUTE(A1," ",CHAR(13)))

Hope this helps,
Miguel.

"D" wrote:

With TRIM function it is possible to erase only double spaces but I need to
erase all spaces in a text cell.
Do I have to use VBA funaction?
Tnx in advance.




[email protected]

how to erase all spaces in text cell?
 
use the edit replace command and replace a single space with nothing at
all.


D

how to erase all spaces in text cell?
 
It helped.
Tnx

"Miguel Zapico" wrote in message
...
You can use a combination of CLEAN and SUBSTITUTE, something like:
=CLEAN(SUBSTITUTE(A1," ",CHAR(13)))

Hope this helps,
Miguel.

"D" wrote:

With TRIM function it is possible to erase only double spaces but I need
to
erase all spaces in a text cell.
Do I have to use VBA funaction?
Tnx in advance.






All times are GMT +1. The time now is 12:04 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com