ID EN
#Text

UNICODE

Excel Functions

Get number from Unicode character

Syntax

EXCEL
=UNICODE(text)

Arguments

Parameter Description
text Unicode character to convert to number.

Return Value

Unicode code point in decimal notation

Details

The Excel UNICODE function returns a number (code point) corresponding to a Unicode character given as text. The result is a number in decimal notation. For example, the Euro symbol (€) is code point 8364 in decimal notation, so UNICODE returns 8364: To get the hexadecimal value, which is usually how unicode code points are expressed, you can use the DEC2HEX function like this: If text is more than one character, UNICODE returns the number of the first character: Note: the UNICHAR function performs the opposite conversion, returning the Unicode character at a given code point. Unicode assigns each character a unique numeric value and name. This numeric value is referred to as a "code point". Code points are typically represented by the "U+" notation followed by hexadecimal numbers. For exa

Examples

Example 1

The Excel UNICODE function returns a number (code point) corresponding to a Unicode character given as text. The result is a number in decimal notatio

EXCEL
=UNICODE("€") // returns 8364
Example 2

To get the hexadecimal value, which is usually how unicode code points are expressed, you can use the DEC2HEX function like this:

EXCEL
=DEC2HEX(UNICODE("€")) // returns 20AC
Example 3

If text is more than one character, UNICODE returns the number of the first character:

EXCEL
=UNICODE("a") // returns 97
=UNICODE("apple") // returns 97
Examples

In decimal representation, the code point for "A" is 65, and the code point for the "😊" emoji is 128522, therefore:

EXCEL
=UNICODE("A") // returns 65
=UNICODE("😊") // returns 128522
Examples

In Excel, you can use the DEC2HEX function to translate numbers from hexadecimal to decimal if needed.

EXCEL
=DEC2HEX(UNICODE("😊")) // returns 1F60A
UNICODE versus UNICHAR

The UNICODE function translates a Unicode character into a code in decimal number format. To perform the opposite conversion, see the UNICHAR function

EXCEL
=UNICHAR(HEX2DEC("1F60A")) // returns "😊"

See Also

UNICODE UNICHAR CODE CHAR