Microsoft Office Tutorials and References
In Depth Information
The CODE and CHAR functions work only with ANSI strings. Excel 2013 introduces two
new functions that are similar to CODE and CHAR, but work with double-byte Unicode
characters. The new functions are UNICODE and UNICHAR.
The CODE function
Excel's CODE function returns the ANSI character code for its argument. The formula that follows returns 65,
the character code for uppercase A:
If the argument for CODE consists of more than one character, the function uses only the first character. There-
fore, this formula also returns 65:
How to find special characters
Don't overlook the handy Symbol dialog box (which appears when you choose Insert⇒Symbols⇒Symbol). This
dialog box makes it easy to insert special characters (including Unicode characters) into cells. For example, you
might (for some strange reason) want to include a smiley face character in your spreadsheet. From the Symbol
dialog box, select the Wingdings font (see the accompanying figure). Examine the characters, locate the smiley
face, click Insert, and then click Cancel. You'll also find out that this character has a code of 74.