TX Sheet Control

CODE Function

Function

Return the numeric code of the first character of a text. The code is that of the Windows-1252 character set, as in Excel on Windows: "A" returns 65, "é" 233 and "€" 128. A character outside that character set returns 63, the code of the question mark, and empty text returns #VALUE!. Use UNICODE for the Unicode code point of a character.

Syntax

CODE(text)

Category: Text. Minimum arguments: 1. Maximum arguments: 1.

Available for supported offline calculation.

Examples

=CODE("😀")

The formula returns 63, because the emoji is not part of the Windows-1252 character set.

Cell and range examples require appropriate input values in the referenced cells. Handle invalid arguments, formula errors and array and spill constraints.

See Also