Formulas > =CODE()

How to Use CODE() in Google Sheets

Description

Returns the numeric Unicode map value of the first character in the string provided.

How To Actually Use CODE() in Sheets

CODE(string)

Try CODE yourself

In cell B1, use the CODE function to find the Unicode value of the first character in cell A1. The result should be a number representing the Unicode value.

Hints (2)

Related formulas

CODE is the reverse of CHAR. Give it a character, get back the number.

  • CHAR turns a number into a character
  • UNICHAR is the Excel equivalent of CHAR for Unicode
  • UNICODE works like CODE in Google Sheets

Browse all characters

Looking for a video tutorial? Members can email me anytime! Check out the blogs below for more info on this formula. Or generate your formula. Find more formulas here at BetterSheets.co/formulas

Transcript-matched member videos for CODE(). Click through to watch.

Browse more tutorials
Hardest Formula: SumIF | Addition Based on Dates / Values

Hardest Formula: SumIF | Addition Based on Dates / Values

Demystifying the SumIF Formula. Add up your values based on a condition,...
Advanced Coding in Google Sheets for Programmers

Advanced Coding in Google Sheets for Programmers

Add a Custom Menu Create Native-like Functions Get URL and Sheet ID's vi...
Write Apps Script to Create a New Google Sheets Formula

Write Apps Script to Create a New Google Sheets Formula

Create a brand new custom formula in Apps Script. We'll do this for our ...
Calculate ROAS in Google Sheets

Calculate ROAS in Google Sheets

Calculate Return on Ad Spend with a formula combination. Bonus: create a...

Learn more about the CODE() formula:

Generate a CODE() formula for your needs

Describe your task in plain English and get a paste-ready formula that uses CODE(). 2 free AI generations, no signup. Members get unlimited use.

Generate a CODE() formula