Dapatkan nomor dari karakter Unicode
=UNICODE(text)
| Parameter | Deskripsi |
|---|---|
text |
Unicode character to convert to number. |
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
=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:
=DEC2HEX(UNICODE("€")) // returns 20AC
If text is more than one character, UNICODE returns the number of the first character:
=UNICODE("a") // returns 97
=UNICODE("apple") // returns 97
In decimal representation, the code point for "A" is 65, and the code point for the "😊" emoji is 128522, therefore:
=UNICODE("A") // returns 65
=UNICODE("😊") // returns 128522
In Excel, you can use the DEC2HEX function to translate numbers from hexadecimal to decimal if needed.
=DEC2HEX(UNICODE("😊")) // returns 1F60A
The UNICODE function translates a Unicode character into a code in decimal number format. To perform the opposite conversion, see the UNICHAR function
=UNICHAR(HEX2DEC("1F60A")) // returns "😊"