ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   how do I remove empty spaces trailing a text string? (https://www.excelbanter.com/excel-worksheet-functions/29483-how-do-i-remove-empty-spaces-trailing-text-string.html)

Need_Help

how do I remove empty spaces trailing a text string?
 
I have a column with multiple length item numbers and some of the cells
contain "spaces" following the number, i.e. "00014C ". This example shows
that there are 6 text characters plus 4 spaces, I can get rid of the spaces
easily for this example, but when i have a column with thousands of rows each
with different number of text characters and different number of spaces, it's
hard to do. Please help!

EA

Have you tried using the 'TRIM' formula? If cell A2="00014C " then in
another cell type: =trim(A2) and you should get "00014C". This will work
even if the spaces are preceeding the field values. Then to save the value,
just copy the trim cell(s), select 'Paste Special...', and select under
'Paste' select 'Values'.

Hope this helps.


"Need_Help" wrote:

I have a column with multiple length item numbers and some of the cells
contain "spaces" following the number, i.e. "00014C ". This example shows
that there are 6 text characters plus 4 spaces, I can get rid of the spaces
easily for this example, but when i have a column with thousands of rows each
with different number of text characters and different number of spaces, it's
hard to do. Please help!


CLR

"ASAP Utilities", a free add-in from www.asap-utilities.com includes this as
one of it's standard features.

Vaya con Dios,
Chuck, CABGx3



"Need_Help" wrote in message
...
I have a column with multiple length item numbers and some of the cells
contain "spaces" following the number, i.e. "00014C ". This example

shows
that there are 6 text characters plus 4 spaces, I can get rid of the

spaces
easily for this example, but when i have a column with thousands of rows

each
with different number of text characters and different number of spaces,

it's
hard to do. Please help!





All times are GMT +1. The time now is 09:51 PM.

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