MS Excel: Code Function
In Excel, the Code function returns the ASCII value of a character or the first character in a cell.
The syntax for the Code function is:
Code( text )
text is the specified character to retrieve the ASCII value for. If there is more than one character, the function will return the ASCII value for the first character and ignore all of the characters after the first.
Applies To:
- Excel 2007, Excel 2003, Excel XP, Excel 2000
For example:
Let's take a look at an example:

Based on the Excel spreadsheet above:
=Code(A1) would return 116 =Code(A2) would return 84 =Code(A3) would return 84