Excel CODE Function

This Excel Tutorial demonstrates how to use the Excel CODE Function in Excel to get the numeric code representing a character, with formula examples.

CODE Function Description:

The CODE Function Returns the numeric code for the first character in a cell containing text. This code refers to the character set on your computer.

Formula Examples:

code function examples

Example Formula Result
1 =CODE(C5) 69
2 =CODE(C6) 101
3 =CODE(C7) 69
4 =CODE(C8) 101

Syntax and Arguments:

The Syntax for the CODE Formula is:

Function Arguments ( Inputs ):

text – A string of text.

Additional Notes

The CODE Function converts a character into it’s corresponding code. The CHAR Function does the reverse. It converts a code into the corresponding character. ‘<


Return to the List of all Functions in Excel

How to use the CODE Function in Excel:

To use the AND Excel Worksheet Function, type the following into a cell:
After entering it in the cell, notice how the AND formula inputs appear below the cell:
code formula syntax
You will need to enter these inputs into the function. The function inputs are covered in more detail in the next section. However, if you ever need more help with the function, after typing “=CODE(” into a cell, without leaving the cell, use the shortcut CTRL + A (A for Arguments) to open the “Insert Function Dialog Box” for detailed instructions:
how to use the code function in excel

For more information about the CODE Formula visit the
Microsoft Website.


"At Automate Excel we offer a range of free resources, software, training, and consulting to help you Excel at Excel. Contact me to learn more."

Steve Rynearson, Chief Excel Officer (CEO) at Automate Excel


I'm constantly posting new free stuff! Sign up here to receive notices.

©  2020 Spreadsheet Boot Camp LLC. All Rights Reserved.