UNICODE is a Text function that returns a corresponding numeric code of a Unicode character. Unicode is a character set, like ASCII. However, it contains characters from different languages, scripts and symbols, including ASCII characters. Each character has its own unique code number which you can find using the UNICODE function. In this guide, we’re going to show you how to use this function and also throw in some tips and error handling methods.

Supported versions

  • Excel 2013 and newer

Syntax

UNICODE(text)

Arguments

text The Unicode character you want to find the code for.

Examples

The UNICODE function is fairly easy to use. You only need to supply the Unicode character. For example, to return 65, you need to supply the capital letter “A” as the text argument.

=UNICODE(“A”)

UNICODE Function 01

You can retrieve numbers up to 255 by using UNICODE in conjunction with the CODE function. The UNICODE function is essentially the only way to work with characters outside of the ASCII character set. For example, symbols like Ω, √ or emojis like ?, ?.
UNICODE 02

The UNICODE character can return a number only for the first character of a string. For example, both “Beskar” and “Battousai” strings return 66. If you want to return codes for all characters of a given string, you need to use helper functions like LEN, MID and SEQUENCE.

The MID function can be used to parse a single character and the SEQUENCE can create a sequence of numbers from 1, up to the length of the entire text string.

=UNICODE(MID(String,SEQUENCE(LEN(String)),1))

UNICODE Function

Download Workbook

Tips

  • You can see list of Unicode characters from here.
  • Unicode contains ASCII character set. The numeric codes are the same for both.
  • You can use the UNICHAR function to get the Unicode character from the given number.

Issues

  • The UNICODE function returns #VALUE error, for a character outside of Unicode character range.