CODE function

Returns a numeric code for the first character in a text string. The returned code corresponds to the character set used by your computer.

Syntax

CODE(text)

Argument

Description

text

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

Character set

Example

To make the following example easier to understand, you can copy the data to a blank sheet and then enter the function underneath the data. Do not select the row or column headings (1, 2, 3... A, B, C...) when you copy the sample data to a blank sheet.

1
2
3
AB
FormulaDescription (Result)
=CODE("A")Displays the numeric code for A (65)
=CODE("!")Displays the numeric code for ! (33)
Rate this content:
Not helpfulSomewhat helpfulHelpfulVery helpfulSolved my problem 
 
Share your feedback about this topic