Practice free

UNICODE function

UNICODE returns the Unicode number of the first character in a piece of text. It is handy for finding mystery characters that TRIM misses, and only the first character is checked.

Example

Read it as a sentence: find the code number for the letter A, which gives 65.

Practice this in the app

Syntax

UNICODE(text)

text (required)
The text; only the first character is used.

Returns: The Unicode code point of the first character.

What Excel actually returns

Each formula below was run in desktop Excel. The result is exactly what the cell showed, errors included.

FormulaExcel showsCase
=UNICODE("A") 65 A
=UNICODE("€") 8364 Euro
=UNICODE(UNICHAR(128512)) 128512 Emoji
=UNICODE("abc") 97 First char only
=UNICODE(1) 49 Number
=UNICODE("") #VALUE! Empty

Watch out for

  • Only the first character is checked.

Where it works

Excel
UNICODE arrived in Excel 2013. Older versions do not have it.
Google Sheets
Same name, same behaviour for everyday use.

Part of Text functions. Every result on this page was measured in desktop Excel, build 16.0.20527. Last updated .