Back to Functions

UNICODE

Returns the decimal Unicode value of the first character of the text.

TextUNICODE(text)

The UNICODE function in Google Sheets returns the decimal Unicode value (code point) of the first character in a given text string. It's the modern, Unicode-aware counterpart to the legacy CODE function. Dive into our comprehensive guide to master its use.

Parameters

  • text: The text or cell reference from which to retrieve the Unicode value of the first character.

Step-by-Step Tutorial

  1. Getting the Unicode value of a letter:

    • Example: =UNICODE("A")
    • Result: 65
  2. Getting the Unicode value of a non-Latin character:

    • Example: =UNICODE("あ")
    • Result: 12354

Use Cases and Scenarios

  1. Text Encoding Analysis: Inspect the underlying Unicode code points of characters in multilingual datasets.
  2. Custom Sorting Logic: Build formulas that sort or compare text based on character code values.
  3. Data Validation: Detect unexpected or non-standard characters by checking their Unicode values.

Related Functions

  • UNICHAR: Returns the character associated with a given Unicode code point.
  • CODE: Returns the numeric Unicode map value of the first character in a string.
  • CHAR: Converts a number into a character according to the current Unicode table.

Related Articles

Newsletter

More UNICODE examples coming soon.

We are building short, practical updates for Sheets power users.