ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Removing Single Spaces (https://www.excelbanter.com/excel-worksheet-functions/211496-removing-single-spaces.html)

kris

Removing Single Spaces
 
Is it possible to remove single spaces from a line?
eg a UPC
1 22222 33333 1
to
122222333331

Ron Rosenfeld

Removing Single Spaces
 
On Mon, 24 Nov 2008 13:12:07 -0800, kris
wrote:

Is it possible to remove single spaces from a line?
eg a UPC
1 22222 33333 1
to
122222333331


=substitute(A1," ","")

or use the Edit/Find & Replace menu option, putting a <space in the Find box,
and nothing in the Replace box.
--ron

David Biddulph[_2_]

Removing Single Spaces
 
=SUBSTITUTE(A1," ","")

Or Edit/ Replace/ space/ replace with/ nothing
--
David Biddulph

"kris" wrote in message
...
Is it possible to remove single spaces from a line?
eg a UPC
1 22222 33333 1
to
122222333331




porter444

Removing Single Spaces
 
Do you have cases where you want to keep multiple spaces?

If not, I'd use the following approach:

1. Select the range you want to eliminate the spaces from (ex: column A)
2. Choose "Edit", "Replace"
3. Enter a single space in the "Replace What" box, and leave "Replace With"
blank.
4. Click replace all.

--
If my posting was helpful, please click the "Yes" button.

ROCK ON!,

Scott


"kris" wrote:

Is it possible to remove single spaces from a line?
eg a UPC
1 22222 33333 1
to
122222333331


kris

Removing Single Spaces
 
Cheers Ron,

I knew about the substitute function but (and still cannot get it to work),
but the find/replace does the trick.

You just saved me alot of time.

Thanks again

"Ron Rosenfeld" wrote:

On Mon, 24 Nov 2008 13:12:07 -0800, kris
wrote:

Is it possible to remove single spaces from a line?
eg a UPC
1 22222 33333 1
to
122222333331


=substitute(A1," ","")

or use the Edit/Find & Replace menu option, putting a <space in the Find box,
and nothing in the Replace box.
--ron


Ron Rosenfeld

Removing Single Spaces
 
On Mon, 24 Nov 2008 13:42:01 -0800, kris
wrote:

Cheers Ron,

I knew about the substitute function but (and still cannot get it to work),
but the find/replace does the trick.

You just saved me alot of time.

Thanks again


Glad to help. Although I'm surprised about the SUBSTITUTE function not working
for you.
--ron


All times are GMT +1. The time now is 09:03 AM.

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