Article updated on January 22, 2018

The CODE function returns a specific number for the first character of the text argument, determined by your computers character set.

Windows ANSI
Macintosh Macintosh character set

Excel Function Syntax

=CODE(text)

Arguments

text Required. The character for which you want the corresponding code.

Comments

A to Z correspond to numbers 65 to 90.

a to z correspond to numbers 97 to 122.