UNICHAR function
The UNICHAR function in Excel is used to return the character that corresponds to a given Unicode value. This is useful when you want to display special characters or symbols that are not readily available on the keyboard, using their Unicode code points.
Syntax:
=UNICHAR(number)
Parameters:
- number (required): The Unicode code point (a number) for which you want to return the corresponding character. Unicode values range from 0 to 1,114,111.
Key Points:
- The
numberparameter represents the Unicode code point of the character you want to retrieve. For example, Unicode value 65 corresponds to the letter “A”, and Unicode value 9786 corresponds to a smiley face emoji (😊). - The function returns a single character that corresponds to the specified Unicode value.
- Unicode values can represent letters, symbols, and even emojis, making this function versatile for displaying various characters.
Examples of Usage:
1. Displaying a Basic Character
If you want to display the character corresponding to Unicode value 65, which is the letter “A”:
=UNICHAR(65)
This will return:
A
Explanation:
- Unicode value
65corresponds to the letter"A".
2. Displaying an Emoji
To display the “smiling face with open mouth” emoji, which has the Unicode value 128512:
=UNICHAR(128512)
This will return:
😀
Explanation:
- Unicode value
128512corresponds to the emoji 😀.
3. Displaying Special Symbols
If you want to display a heart symbol, which has the Unicode value 9829:
=UNICHAR(9829)
This will return:
❤️
Explanation:
- Unicode value
9829corresponds to the heart symbol ❤️.
4. Displaying a Mathematical Symbol
To display the Greek letter “π” (pi), which has the Unicode value 960:
=UNICHAR(960)
This will return:
π
Explanation:
- Unicode value
960corresponds to the Greek letter π.
Notes:
- Unicode Values: Unicode is a standard used to represent text and symbols across different systems, and its values are universal. Excel can handle a wide range of Unicode values, including special characters, emojis, and even characters from different languages.
- Limitations: The
UNICHARfunction can only handle Unicode values between 0 and 1,114,111. If you input a number outside this range, it will return an error.
Related Functions:
UNICODE: Returns the Unicode value of the first character in a text string. This is the inverse of theUNICHARfunction. For example,UNICODE("A")returns65.
The UNICHAR function is great for displaying special characters or symbols that are not directly available on the keyboard, and it supports a vast range of Unicode characters, from simple letters to complex emojis and symbols.