Q: Deleting the last character from text fields in excel [Us@ cod@ to @-mail m@]

S

S.V.Proff

I have a bunch of text with a trailing blank.

How can I get rid of them?

In MS word there is the ^p to indicate the end of the line.

Is there something like this in Excel?

Thanks!

Sam

(Post your replies here. My e-mail is spam proofed unless you use a code)
 
M

mzehr

Hi, S.V.
Short of going to VBA, have you tried to insert a helper
column and use the trim function?

HTH
 
D

Doug Kanter

You could try the CLEAN function: "Removes all nonprintable characters from
text"
or
the TRIM function: "Removes all spaces from a text string except for single
spaces between words"
 
P

Peo Sjoblom

TRIM in this case if it is spaces, CLEAN won't do anything about spaces,
none of them work if they are trailing html characters, then the OP would
need

=TRIM(SUBSTITUTE(A1,CHAR(160),""))

--
No private emails please, for everyone's
benefit keep the discussion in the newsgroup.


Regards,

Peo Sjoblom
 
S

S.V.Proff

Thanks guys.

Peo Sjoblom said:
TRIM in this case if it is spaces, CLEAN won't do anything about spaces,
none of them work if they are trailing html characters, then the OP would
need

=TRIM(SUBSTITUTE(A1,CHAR(160),""))

--
No private emails please, for everyone's
benefit keep the discussion in the newsgroup.


Regards,

Peo Sjoblom
 
Top