Degree Symbol Question

spectraflame

Well-known Member
Joined
Dec 18, 2002
Messages
829
Office Version
  1. 365
Platform
  1. Windows
I was just reviewing some old posts about how to iinsert the degree symbol. A friend and I reviewed all of the methods that we could find or think of and came up with the following.

- Use Auto Correct - define a word or something that you know to refer to degrees and when that word is keyed in, it is corrected to the degree symbol.

- Use CHAR(176)

- Hold down the ALT key and use the numeric keypad to key in 0176

- Hold down the ALT key and use the number keypad to key in 248

The first 3 methods were both were comfortable, but my friend used the ALT 248 method in cell A1. Then in cell A2 he keyed in =CODE(A1) and the result was 176. Then he tried to key in =CHAR(248), but it did not return the degree symbol.

Our question is how does ALT 248 return a degree symbol?

Also, are there other ways to produce the degree symbol?

Thanks,
Matthew
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Select INSERT then SYMBOL then in the Font box choose Normal Text and you will find a degree sign.
 
Upvote 0
I tried to read the Windows Help file regarding this and to be quite frank that made it even more confusing. However, using CHAR(248) would return the character equivalent to typing ALT-0248 which is why it wasn't a degree symbol, but this ø

ALT-248 will generate a degree symbol, but the degree symbol (in many fonts) is ASCII code 176 which is what the CHAR function returned.

If you are going to use ALT codes, I would be more inclined to stay with the ALT-0xxx codes, ALT-0176 in this case.
 
Upvote 0
spectraflame said:
Our question is how does ALT 248 return a degree symbol?
Also, are there other ways to produce the degree symbol?
To answer your second question first, you can use VBA to produce the degree symbol ° with a statement like
ActiveCell.Value = Chr(176)

Your first question should have not have been "How", but "Why" does Alt+248 return the degree symbol °. The "How" is easy - - by hitting the keys on the keyboard just like for any other character.

The "Why" is more interesting, and here is the answer:

CHAR returns the character specified by a number. The characters belong to the ANSI character set for either Windows or Macintosh character sets.

The ASCII (pronounced "askey") character set is a set of 127 numbers (from 1 to 127) that translate to characters, and another set from 128 to 255 that are determined by the code page specific to your operating system. For example, the alphabet characters fall between 65 and 90 for upper case letters, and 97 to 122 for lower case letters. In the Windows environment as you have seen, you can return those advanced characters like the degree symbol, with a formula such as =CHAR(176), or by pressing Alt + 0176. For this ASCII set, using Alt requires a 4-digit ASCII code reference, with leading zeros. Pressing Alt + 0065 returns "A". That's the way it is for that character set in Windows.

As computers proliferated, the ASCII set became too restrictive because people needed to include other characters in their documents. A standard set of "extended" characters became accepted over time, with some overlap to the ASCII set of 128 to 255. It so happens that the degree symbol is one such character, which is assigned the accepted extended ASCII character number 248. In Windows, the extended characters are entered without the preceding zero, for just a 3-number entry with the Alt key. That is why pressing Alt+248 in Windows also returns the degree symbol.
 
Upvote 0
Thanks for the low down Tom.

BTY: I tried the suggestion by JuneBug, but I do not have Symbol as a choice in my Insert menu. I am running Office 2000 Pro. I know that it works in MS Word. Am I missing an add-in for Excel to be able to use this method?

Matthew
 
Upvote 0
Good review, Tom.

Let me add that IBM provided MS-DOS with its 256-character set, the first 128 of which consisted of the existing ASCII code, the second 128 characters being IBM's "extended character set", in which Charcter 248 IS the degree symbol. All BASICs, excluding Visual Basic, use this character 248, while VB uses character 176.

Likewise, the MS-DOS based Alt+ still requires Alt+248 to produce the degree symbol, while the Windows-based use is coded as Alt+0176.

My question is, where does the 0176 come from, and if this corresponds to some extended character set, what is this character set, and where does one find the full set?

And, Tom, pressing the good old, Alt+65 seems easier to me than Alt+0065! For all the 127 characters of the ASCII set, I prefer to just use Alt+ the two- or three-digit number, without the leading 0.

Ralph
 
Upvote 0

Forum statistics

Threads
1,214,945
Messages
6,122,395
Members
449,081
Latest member
JAMES KECULAH

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top