CODE Function Explained

The CODE function in Microsoft Excel returns a numerical code for the first character in a text string. It returns the character code corresponding to the first character in a text string, as determined by the character set used by your computer. The character code is a number between 1 and 255 that corresponds to the character in the ASCII character set.

CODE Function Syntax

CODE(text)

  • text: The text for which you want the code of the first character.