ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   removing blanks at the end of text (https://www.excelbanter.com/excel-worksheet-functions/122364-removing-blanks-end-text.html)

Roger

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.

John Bundy

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.


Don Guillett

removing blanks at the end of text
 
have a look in the help index for TRIM

--
Don Guillett
SalesAid Software

"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.




David Biddulph

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.




Dave Peterson

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

PapaDos

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.



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

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