Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default remove tail spaces

Hi

I'm trying to remove spaces from the end of text without success. A cell
contains for example: The(space)Cat(space)Sat(space)(space)(space)(space )
What i want is: The(space)Cat(space)Sat

What i am trying to do is search from the right, the first non-space
character, get it's position value in the overall cell length and with the
use of the Len function, remove all spaces after the final character. Please
note that the number of words in each text piece vary.

Any ideas please?
Rich
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default remove tail spaces

=TRIM(A1)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"RichHoughton" wrote in message
...
Hi

I'm trying to remove spaces from the end of text without success. A cell
contains for example: The(space)Cat(space)Sat(space)(space)(space)(space )
What i want is: The(space)Cat(space)Sat

What i am trying to do is search from the right, the first non-space
character, get it's position value in the overall cell length and with the
use of the Len function, remove all spaces after the final character.

Please
note that the number of words in each text piece vary.

Any ideas please?
Rich



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default remove tail spaces

Brilliant, thanks

"Bob Phillips" wrote:

=TRIM(A1)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"RichHoughton" wrote in message
...
Hi

I'm trying to remove spaces from the end of text without success. A cell
contains for example: The(space)Cat(space)Sat(space)(space)(space)(space )
What i want is: The(space)Cat(space)Sat

What i am trying to do is search from the right, the first non-space
character, get it's position value in the overall cell length and with the
use of the Len function, remove all spaces after the final character.

Please
note that the number of words in each text piece vary.

Any ideas please?
Rich




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I remove all spaces in a text string dn Excel Discussion (Misc queries) 3 April 2nd 23 07:20 PM
Spaces in cells Brian Excel Worksheet Functions 1 August 2nd 06 06:17 AM
spaces not recognized as spaces windsurferLA Excel Worksheet Functions 9 July 27th 06 11:49 AM
a formular to remove spaces in a numeric cell (Phone No) Joco Excel Worksheet Functions 7 July 20th 06 05:08 PM
Remove Leading Spaces Kirk P. Excel Discussion (Misc queries) 3 March 3rd 05 01:30 PM


All times are GMT +1. The time now is 09:30 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"