logo
excelfunctions.org
bookmarks

CODE

Returns a numeric code for the first character in a text string.

TextText Processing

What it does

Returns the ASCII/ANSI code for the first character in a string.

Syntax

CODE(text)

Arguments

  • text(text) β€” Text string.

Examples

Get ASCII Code

Get code for 'A'.

FORMULA
=CODE("A")
RESULT
65
SAMPLE DATA
A
1Char
2A