CODE Function

About

CODE function in Excel returns the numeric code of the given character. For example, =CODE(“B”) returns the number 66.

Function Type

Text

Purpose

Get the numeric code of a character.

Return value

A number equivalent to the numeric code of the character.

Syntax

=CODE(text)

Arguments

text – The text of which you want the numeric code.


Example


Notes

CODE function returns the numeric code of first character in the text string.

Windows characters set

Macintosh character set


Read about Excel Functions

Excel Functions in Alphabetical Order (Complete list)

Complete List of Excel Functions (Category wise)


New Dynamic Array Functions in Excel

LET Function in Excel

STOCKHISTORY Function in Excel