ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   TRIM (https://www.excelbanter.com/excel-discussion-misc-queries/228496-trim.html)

Nikki

TRIM
 
Cell E1 has the name John followed by 13 spaces (comes out of the database
this way). How do I remove the 13 spaces? I tried trim((e1)&" "&g1) but it
doesn't work. Please help as this is driving me crazy. Thanks to those of you
who made suggestions already. I also tried the code in a simple Macro that is
application.trim(range("e1")) and can't seem to get that to work either.

Thanks
Nikki

kassie

TRIM
 
With your name in E1, insert a new column F.
Enter in F1 =TRIM(E1).
Select F1, copy, and paste special as value in E1. Your spaces should be
gone. Delete Col F

--
HTH

Kassie

Replace xxx with hotmail


"Nikki" wrote:

Cell E1 has the name John followed by 13 spaces (comes out of the database
this way). How do I remove the 13 spaces? I tried trim((e1)&" "&g1) but it
doesn't work. Please help as this is driving me crazy. Thanks to those of you
who made suggestions already. I also tried the code in a simple Macro that is
application.trim(range("e1")) and can't seem to get that to work either.

Thanks
Nikki


joeu2004

TRIM
 
"Nikki" wrote:
Cell E1 has the name John followed by 13 spaces [....].
How do I remove the 13 spaces? I tried trim((e1)&" "&g1)
but it doesn't work.


If you enter the formula __exactly__ the way Don told you to yesterday, you
should have no problem. Copy-and-paste the following formula:

=trim(e1)&" "&g1


----- original message -----

"Nikki" wrote in message
...
Cell E1 has the name John followed by 13 spaces (comes out of the database
this way). How do I remove the 13 spaces? I tried trim((e1)&" "&g1) but it
doesn't work. Please help as this is driving me crazy. Thanks to those of
you
who made suggestions already. I also tried the code in a simple Macro that
is
application.trim(range("e1")) and can't seem to get that to work either.

Thanks
Nikki



Gord Dibben

TRIM
 

See my reply at your other thread.

Please stay with one thread.


Gord Dibben MS Excel MVP

On Wed, 22 Apr 2009 08:29:03 -0700, Nikki
wrote:

Cell E1 has the name John followed by 13 spaces (comes out of the database
this way). How do I remove the 13 spaces? I tried trim((e1)&" "&g1) but it
doesn't work. Please help as this is driving me crazy. Thanks to those of you
who made suggestions already. I also tried the code in a simple Macro that is
application.trim(range("e1")) and can't seem to get that to work either.

Thanks
Nikki




All times are GMT +1. The time now is 07:02 PM.

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