The character encoding used by your computer depends on the operating system used.
Windows uses the ANSI character set, whereas Macintosh uses the Macintosh character set.Therefore, the numeric codes returned by the Excel Code Function for specific characters may be different for different operating environments.
The Excel CODE function converts the first character of a supplied text string into the associated numeric character set code used by your computer.
Note that the returned code may vary across different computer systems.
The syntax of the Code function is:
Where the text argument is a text string.
The following spreadsheet shows examples of the Excel Code function returning the numeric code for four different characters.
Note that these results are from the Ansi character set (used on the Windows operating system).
Further information and examples of the Excel Code Function are provided on the Microsoft Office website.