Remove all spaces in a cell...

K

killertofu

I am trying to remove all the spaces from a cell so that I can create a
single word. For example, in A1, I have "HOT DOG" then in A2, I would
like "HOTDOG."

The only function I know that comes close to this is TRIM, but that
still leaves single spaces in between.

Thanks for the help people.
 
A

Arvi Laanemets

Hi

Select the range with entries, you want to clean from all spaces. From menu,
activate Replace dialog. Replace all spaces (" ") wit nothing.


Arvi Laanemets
 
R

Ron Coderre

Perhaps this will work for you:

For text in A1

B1: =SUBSTITUTE(A1," ","")

Does that help?

Regards,
Ro
 
D

Dave Peterson

=substitute(a1," ","")

is one way.
I am trying to remove all the spaces from a cell so that I can create a
single word. For example, in A1, I have "HOT DOG" then in A2, I would
like "HOTDOG."

The only function I know that comes close to this is TRIM, but that
still leaves single spaces in between.

Thanks for the help people.
 
B

Biff

Hi!

Try this:

=SUBSTITUTE(A1," ","")

Or, you could use Edit>Replace and do this in-place and not have to use a
helper cell/column.

Select the cell(s) in question
Goto Edit>Replace
Find what: enter a space by hitting the spacebar
Replace with: nothing, leave this blank
Replace all

Biff
 
K

Ken Wright

=SUBSTITUTE(A1)

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

------------------------------­------------------------------­----------------
It's easier to beg forgiveness than ask permission :)
------------------------------­------------------------------­----------------
 
K

Ken Wright

Would have helped if I included all the damn arguments (Last one is
optional).

=substitute(text,old_text,new_text,instance_num)

=SUBSTITUTE(A1," ","")

Regards
Ken..............
 
Top