Remove all spaces in a cell...

  • Thread starter Thread starter killertofu
  • Start date Start date
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.
 
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
 
Perhaps this will work for you:

For text in A1

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

Does that help?

Regards,
Ro
 
=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.
 
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
 
=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 :-)
------------------------------­------------------------------­----------------
 
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..............
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top