Excel TRIM function

  • Thread starter Thread starter Kathy
  • Start date Start date
K

Kathy

How do you use this function? HELP gives the syntax, but
how do you apply it? I have a column with double spaces
between the text. I want to change the double to a single
space. REPLACE function will not apply to spaces, for
instance, Replace two spaces, With one space.
Thanks!
 
Kathy

Data in A1:A10

In B1 enter =TRIM(A1)

Drag/copy using fill handle down to B10.

Copy B1:B10 and Paste Special>Values

Delete Column A.

Gord Dibben Excel MVP - XL97 SR2 & XL2002
 
Hi Norman,
Thanks for the help with the count. Here I was
manually counting spaces and text to stay within a limit on
some columns. Now I can just apply the LEN part of the
formula. Now that I know how to use a formula.
Thanks again, Kathy
 
Hi, Kathy:

You CAN use Search and Replace to replace two spaces with one. Try it.

Hi Gord,
Thanks ever so much for passing on the info. It works!
And explaining it so that I understood. The basics is
what I needed. Oh! To pass on one little thing. B, the
new column I inserted beside A, had to be in General, not
Text, to work. I don't know why but in Text it wouldn't
work. I had to look up 'fill handle' too. Until now, I
didn't know what that was. My editing is such a breeze
now.
Thanks again, Kathy
 
Back
Top