Excel Function: UNICHAR

Purpose

The UNICHAR function translates a number into the character it corresponds to in the unicode character set. In addition to allowing one to include useful but difficult-to-access unicode characters in the outputs generated by formulae, UNICHAR provides a means through which one can work with non-printing characters, such as line breaks and carriage returns.

Invocations of the UNICHAR function take the form:

UNICHAR(number)

Example

Consider a cell containing the formula:

=CONCAT("Hello", UNICHAR(10), "World")

The formula concatenates “Hello”, UNICHAR(10) and “World” together and returns the following text value:

Hello
World

UNICHAR(10) is translated into the new-line non-printing character and is responsible for “Hello” and “World” appearing on different lines.

Arguments

ArgumentArgument typeDescription
numberMandatoryA number whose corresponding unicode character will be looked up & returned.

Related Functions

FunctionExamplePurpose
CHARCHAR(number)Translates a number into the character to which it corresponds in the character set of your computer. CHAR is limited to translating numbers between 1 & 255 to characters.

Error Conditions

Error valueCondition typeCondition
#VALUE!Bad argumentThe number supplied as an argument does not correspond to a unicode character.
#VALUE!Bad argumentEither the value supplied to the number argument is not a number or it can’t be treated as one.
#VALUE!Bad argumentThe value zero (0) was supplied to the number argument.

Examples

ExampleFormulaResultDescription
1=UNICHAR(100)dThe unicode character corresponding to the number passed to it is returned.
2=UNICHAR(DATE(2023,5,7))The date May 7, 2023 is stored as 45053. The unicode character “꿽” was returned.
3=UNICHAR("1E+3")ϨText that can be interpreted as a number will not cause an error.

Examples: Errors

ExampleFormulaResultDescription
1=UNICHAR(0)#VALUE!Supplying zero (0) to the UNICHAR function causes an error.
2=UNICHAR("a")#VALUE!The value supplied to the number argument was not a number.
3=UNICHAR(5000000)#VALUE!The value supplied to the number argument did not correspond to a unicode character.