CODE

H

Hans Knudsen

Hello
What should I write instead of
=CODE("space")
to get 160 returned. As written it returns 115 (=CODE("s")).

Hans Knudsen
 
C

Chip Pearson

I'm not sure what you're trying to do, but you can enter code 160
with CHAR(160) or holding down the ALT key and typing 0160 on the
numeric keypad.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
D

Dave R.

Used this way, CODE returns one value for one character. "space" is
equivilant to "s" as you've found out.

160 is not a standard space (here in the USA, as far as I know). Your space,
=CHAR(160) can be generated by holding ALT then entering 255 then releasing
ALT. Here again I don't know how/if world region plays into this.

=CODE(" ") with a standard space (spacebar) returns 32.
 
H

Hans Knudsen

Let me explain a bit.
I had downloaded some data (numbers) from our intranet and wondered why I couldn't sum them. I tried more things including
multiplying the numbers by one but nothing seemed to work. Finally I noticed that the the last digit of each number was followed by
a space. I tried to use Find/Replace All, that is Find Alt+032 and Replace with nothing. This didn't work. Then I tried the same,
but instead of Alt+032 I used Alt+160 and then it worked. Now I could sum the numbers.

If I enter for example the formula: =CODE("£")
then it returns 163.
So, by my question I meant. What should I enter instead of £ in above formula to get the result 160 (only because I am curious to
know).

Regards
Hans Knudsen
 
D

Dave R.

And now you have the answer.. right? Alt-0160 or Alt-255.



Hans Knudsen said:
Let me explain a bit.
I had downloaded some data (numbers) from our intranet and wondered why I
couldn't sum them. I tried more things including
multiplying the numbers by one but nothing seemed to work. Finally I
noticed that the the last digit of each number was followed by
a space. I tried to use Find/Replace All, that is Find Alt+032 and Replace
with nothing. This didn't work. Then I tried the same,
but instead of Alt+032 I used Alt+160 and then it worked. Now I could sum the numbers.

If I enter for example the formula: =CODE("£")
then it returns 163.
So, by my question I meant. What should I enter instead of £ in above
formula to get the result 160 (only because I am curious to
 
P

Peo Sjoblom

I believe Hans meant if there was a "physical" character to enter but since
char 160 is an invisible html character there
is none
 
H

Harlan Grove

Peo Sjoblom wrote...
I believe Hans meant if there was a "physical" character to enter but since
char 160 is an invisible html character there
is none
....

It's not invisible. It takes up space. It's just not distinguishable
from ASCII space.
 
H

Hans Knudsen

Your belief was exactly what I meant.
I just wondered how character 160 differs from character 32 where you have kind of a "physical" character. CODE(" ") = 32

Regards
Hans
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top