Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 226
Default removing blanks at the end of text

I need to remove spaces (blank) from the end of a line of text. I ususally
would simply find and replace, but in this case the text has spaces with in
it that I do not want to remove, I only want to clear the spaces after the
text, can anyone help?

thanks in advance.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 125
Default removing blanks at the end of text

=trim() takes excess spaces off the front and back
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"Roger" wrote:

I need to remove spaces (blank) from the end of a line of text. I ususally
would simply find and replace, but in this case the text has spaces with in
it that I do not want to remove, I only want to clear the spaces after the
text, can anyone help?

thanks in advance.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 620
Default removing blanks at the end of text

=TRIM(A1)
--
David Biddulph

"Roger" wrote in message
...
I need to remove spaces (blank) from the end of a line of text. I ususally
would simply find and replace, but in this case the text has spaces with
in
it that I do not want to remove, I only want to clear the spaces after the
text, can anyone help?

thanks in advance.



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default removing blanks at the end of text

And also changes multiple internal spaces to single spaces.

John Bundy wrote:

=trim() takes excess spaces off the front and back
--
-John
Please rate when your question is answered to help us and others know what
is helpful.

"Roger" wrote:

I need to remove spaces (blank) from the end of a line of text. I ususally
would simply find and replace, but in this case the text has spaces with in
it that I do not want to remove, I only want to clear the spaces after the
text, can anyone help?

thanks in advance.


--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 208
Default removing blanks at the end of text

If you want to remove multiple spaces only at the end, something like this
would work:

=LEFT( A1, LEN( A1 ) - SUMPRODUCT( --( RIGHT(A1, ROW($1:$100) ) = REPT( " ",
ROW($1:$100) ) ) ) )

That formula is good for up to 100 ending spaces, adjust the 2 instances of
ROW($1:$100) to your need. A smaller range is faster...
--
Regards,
Luc.

"Festina Lente"


"Roger" wrote:

I need to remove spaces (blank) from the end of a line of text. I ususally
would simply find and replace, but in this case the text has spaces with in
it that I do not want to remove, I only want to clear the spaces after the
text, can anyone help?

thanks in advance.

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
Sumproduct issues SteveDB1 Excel Worksheet Functions 25 June 3rd 09 04:58 PM
Text entries behaving like numbers jkiser Excel Discussion (Misc queries) 12 August 30th 06 09:29 PM
Removing Blanks Carl Excel Worksheet Functions 2 August 8th 06 07:14 PM
Removing blanks from a spreadsheet Niels Jonker Excel Worksheet Functions 2 August 8th 06 07:58 AM
Read Text File into Excel Using VBA Willie T Excel Discussion (Misc queries) 13 January 8th 05 12:37 AM


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

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"