#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Function =Trim()

I've been using Trim to delete extra spaces from fields that contain imported
data. Today I tried to use it on data that I'd copied from a webpage and
inserted into a spreadsheet, but it wouldn't take off the blanks after the
numbers. Am I mis-using the function? These were numbers that I'd copied as
a bulk which 'self-segregated' into individual cells. I then re-copied them
changing from colums to rows using Paste-Special. Then I tried to use Trim,
but it had no effect. I needed to remove the spaces so that I could divide
the numbers by 100.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,722
Default Function =Trim()

If you're dealing with numbers stored as text (have extra spaces) it might be
better to use the VALUE function to convert the text to a number.

Or, note that if you have " 500 " in A2 formatted as text, you can still
have another cell have
=A2/100
and it will show correct answer (5)
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Dowitch" wrote:

I've been using Trim to delete extra spaces from fields that contain imported
data. Today I tried to use it on data that I'd copied from a webpage and
inserted into a spreadsheet, but it wouldn't take off the blanks after the
numbers. Am I mis-using the function? These were numbers that I'd copied as
a bulk which 'self-segregated' into individual cells. I then re-copied them
changing from colums to rows using Paste-Special. Then I tried to use Trim,
but it had no effect. I needed to remove the spaces so that I could divide
the numbers by 100.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Function =Trim()

I didn't know about the VALUE function. I'll use that next time.

I found the problem when I tried to use the Paste Special function to divide
the series. When that didn't work, I tried to go to a separate cell and
create a function (=A2/C2) where C2 = 100, but got an error message. I had
what appeared to be "500 ". Is that handled differently if there are no
leading spaces?

"Luke M" wrote:

If you're dealing with numbers stored as text (have extra spaces) it might be
better to use the VALUE function to convert the text to a number.

Or, note that if you have " 500 " in A2 formatted as text, you can still
have another cell have
=A2/100
and it will show correct answer (5)
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Dowitch" wrote:

I've been using Trim to delete extra spaces from fields that contain imported
data. Today I tried to use it on data that I'd copied from a webpage and
inserted into a spreadsheet, but it wouldn't take off the blanks after the
numbers. Am I mis-using the function? These were numbers that I'd copied as
a bulk which 'self-segregated' into individual cells. I then re-copied them
changing from colums to rows using Paste-Special. Then I tried to use Trim,
but it had no effect. I needed to remove the spaces so that I could divide
the numbers by 100.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,722
Default Function =Trim()

No, leading or nonleading should not have made a difference...
After trying to duplicate your situation, perhaps what you see is not truly
a "space", but some other nonprintable character. In which case, use the
CLEAN function to remove those characters, and then you'll be able to use
either the VALUE or direct math function to fully convert to a working number.

--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Dowitch" wrote:

I didn't know about the VALUE function. I'll use that next time.

I found the problem when I tried to use the Paste Special function to divide
the series. When that didn't work, I tried to go to a separate cell and
create a function (=A2/C2) where C2 = 100, but got an error message. I had
what appeared to be "500 ". Is that handled differently if there are no
leading spaces?

"Luke M" wrote:

If you're dealing with numbers stored as text (have extra spaces) it might be
better to use the VALUE function to convert the text to a number.

Or, note that if you have " 500 " in A2 formatted as text, you can still
have another cell have
=A2/100
and it will show correct answer (5)
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Dowitch" wrote:

I've been using Trim to delete extra spaces from fields that contain imported
data. Today I tried to use it on data that I'd copied from a webpage and
inserted into a spreadsheet, but it wouldn't take off the blanks after the
numbers. Am I mis-using the function? These were numbers that I'd copied as
a bulk which 'self-segregated' into individual cells. I then re-copied them
changing from colums to rows using Paste-Special. Then I tried to use Trim,
but it had no effect. I needed to remove the spaces so that I could divide
the numbers by 100.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Function =Trim()

Looks like I lied. Neither CLEAN nor VALUE solve the problem. Both leave
what appear to be spaces after the number. Doing a Find/Replace for the
spaces does eliminate them. Is that the only way?

"Luke M" wrote:

No, leading or nonleading should not have made a difference...
After trying to duplicate your situation, perhaps what you see is not truly
a "space", but some other nonprintable character. In which case, use the
CLEAN function to remove those characters, and then you'll be able to use
either the VALUE or direct math function to fully convert to a working number.

--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Dowitch" wrote:

I didn't know about the VALUE function. I'll use that next time.

I found the problem when I tried to use the Paste Special function to divide
the series. When that didn't work, I tried to go to a separate cell and
create a function (=A2/C2) where C2 = 100, but got an error message. I had
what appeared to be "500 ". Is that handled differently if there are no
leading spaces?

"Luke M" wrote:

If you're dealing with numbers stored as text (have extra spaces) it might be
better to use the VALUE function to convert the text to a number.

Or, note that if you have " 500 " in A2 formatted as text, you can still
have another cell have
=A2/100
and it will show correct answer (5)
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Dowitch" wrote:

I've been using Trim to delete extra spaces from fields that contain imported
data. Today I tried to use it on data that I'd copied from a webpage and
inserted into a spreadsheet, but it wouldn't take off the blanks after the
numbers. Am I mis-using the function? These were numbers that I'd copied as
a bulk which 'self-segregated' into individual cells. I then re-copied them
changing from colums to rows using Paste-Special. Then I tried to use Trim,
but it had no effect. I needed to remove the spaces so that I could divide
the numbers by 100.



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Function =Trim()

If you don't want to use the time-saving macro...

Select the cells that contain these numbers.
Goto the menu EditReplace
Find what:

Hold down the ALT key and using the **numeric keypad** type 0160

Release the ALT key. When you do that you won't see anything in the "Find
what" box but there is a char 160 space in there.

Replace with: nothing, leave this blank
Replace All

That will remove all those char 160 characters then you can use normal
formulas.

--
Biff
Microsoft Excel MVP


"Dowitch" wrote in message
...
Looks like I lied. Neither CLEAN nor VALUE solve the problem. Both leave
what appear to be spaces after the number. Doing a Find/Replace for the
spaces does eliminate them. Is that the only way?

"Luke M" wrote:

No, leading or nonleading should not have made a difference...
After trying to duplicate your situation, perhaps what you see is not
truly
a "space", but some other nonprintable character. In which case, use the
CLEAN function to remove those characters, and then you'll be able to use
either the VALUE or direct math function to fully convert to a working
number.

--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Dowitch" wrote:

I didn't know about the VALUE function. I'll use that next time.

I found the problem when I tried to use the Paste Special function to
divide
the series. When that didn't work, I tried to go to a separate cell
and
create a function (=A2/C2) where C2 = 100, but got an error message.
I had
what appeared to be "500 ". Is that handled differently if there
are no
leading spaces?

"Luke M" wrote:

If you're dealing with numbers stored as text (have extra spaces) it
might be
better to use the VALUE function to convert the text to a number.

Or, note that if you have " 500 " in A2 formatted as text, you can
still
have another cell have
=A2/100
and it will show correct answer (5)
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Dowitch" wrote:

I've been using Trim to delete extra spaces from fields that
contain imported
data. Today I tried to use it on data that I'd copied from a
webpage and
inserted into a spreadsheet, but it wouldn't take off the blanks
after the
numbers. Am I mis-using the function? These were numbers that I'd
copied as
a bulk which 'self-segregated' into individual cells. I then
re-copied them
changing from colums to rows using Paste-Special. Then I tried to
use Trim,
but it had no effect. I needed to remove the spaces so that I
could divide
the numbers by 100.



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
Function =Trim() Dowitch Excel Worksheet Functions 1 April 29th 09 06:49 PM
Trim Function Saxman[_2_] Excel Discussion (Misc queries) 7 August 2nd 07 01:20 AM
TRIM function fitou_learn[_2_] New Users to Excel 2 June 12th 07 11:06 AM
Trim Function Steved Excel Worksheet Functions 5 August 4th 05 11:06 PM
Trim function aehan Excel Worksheet Functions 3 January 25th 05 12:31 PM


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

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

About Us

"It's about Microsoft Excel"