Skip to main content
Version: Streamsheets 3.0

CODE

Returns the numeric code for first character of given string.

Syntax

=CODE(Text, [CharacterSet])

Arguments

NameTypeDescription
TextStringA string for which to return the code of its first character.
CharacterSet (optional)CharacterSetA string which specifies the character set to use for converting the character.

Options:
"ansi": ANSI (Codepage 1252)

Return

TypeDescription
NumberThe numeric code of first character of specified text.

Examples

FormulaResultComment
=CODE("A")
65
=CODE("€")
128
=CODE("€", "ansi")
128