Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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. |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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. |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sumproduct issues | Excel Worksheet Functions | |||
Text entries behaving like numbers | Excel Discussion (Misc queries) | |||
Removing Blanks | Excel Worksheet Functions | |||
Removing blanks from a spreadsheet | Excel Worksheet Functions | |||
Read Text File into Excel Using VBA | Excel Discussion (Misc queries) |