CODE

corresponding code of a character in Excel
Corresponding ANSI code of a character

Rational

Return the corresponding ANSI code of a character.

Description

The Excel CODE function display a unique number of each valid character based on the underlying set standard of American National Standards Institute (ANSI). The set of such characters is called the ANSI character set, and the numbers assigned to each character are called the ANSI codes.

Syntax

= CODE(text)

Parameters

text – A character represented by an ANSI code.

Return Value

An integer between 1 and 255.

Key Notes

The CODE function result is the opposite of the CHAR function.

The Microsoft Excel CODE function returns the number based on the ASCII value.

Return numbers depend upon the operating environment used by computer:

For example in Window, = CODE(!) (exclamation mark) in Excel returns 33 number.
For example in Window, = CHAR(<) (greater than Sign) in Excel returns 62 number.

Keep Reading Similar Functions:

Convert a text string without number format in Excel

VALUE

The VALUE function converts valid numbers with various number formatting (number, date, $ etc.) into a code number. E.g. “=VALUE(“31-12-2017”)” returns “43100”.

Read More »
Return the corresponding ANSI character of a number in Excel

CHAR

The CHAR function display characters based on the underlying ANSI numeric codes. I.e. in Window, = CHAR(33) in Excel returns “!” (exclamation mark).

Read More »