text and numbers

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I was given a spreadsheet having a bunch of entries that appear to be
numbers, but when I try to do arithemetic with them, I get a #VALUE error.
I tried using the VALUE function to convert them to numbers, but the result
of this function is also a #VALUE error. Tracing the error shows it is trying
to evaluate
VALUE(" 1,291").
I tried using the TRIM function to remove leading blanks, but that did not
work.
I used the CODE function to find out what the characters were and find the
leading characters have a CODE value of 160 (a space I think should be 32).

How do I convert these characters to numbers?

Thanks
Sanford
 
If the number of "spaces" is consist in each of the cells, for example 3, you
can use the mid function.

=MID(A1,4,50)*1

Steven
 
I was given a spreadsheet having a bunch of entries that appear to be
numbers, but when I try to do arithemetic with them, I get a #VALUE error.
I tried using the VALUE function to convert them to numbers, but the result
of this function is also a #VALUE error. Tracing the error shows it is trying
to evaluate
VALUE(" 1,291").
I tried using the TRIM function to remove leading blanks, but that did not
work.
I used the CODE function to find out what the characters were and find the
leading characters have a CODE value of 160 (a space I think should be 32).

How do I convert these characters to numbers?

Thanks
Sanford

That is a spacing character frequently used in HTML web pages.

This formula will convert it to a real number:

=--TRIM(SUBSTITUTE(A1,CHAR(160),""))




--ron
 
hi your reply, =--TRIM(SUBSTITUTE(A1,CHAR(160),"")) was very useful. But how
can that be used to convert a range of cells?
 
Hi!

Select the range of cells in question.

Goto Edit>Replace
In the Find What box enter this code:

While holding down the ALT key, use the *numeric keypad* and type 0160

Using the QWERTY number keys won't work, you MUST use the numeric keypad

In the Replace With box: leave this empty, don't enter anything

Click Replace All

Biff
 
Back
Top