Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

Excel CODE function

The Microsoft Excel CODE function returns a numeric code of a character or the first character in a given text string cell.


Syntax

=CODE (text)


Arguments

Text (Required): The text for which you want to get the numeric code of the first character.


Return Value

Return a numeric code for a character.


Function Note

1. The #VALUE! Error occurs when the text argument is empty.
2. The returned code corresponds to the character set used by your computer.


Examples

The below example shows you how to use the CODE function in Excel.

1. Select a blank cell to output the code, copy the below formula into it and press the Enter key.
=CODE(B5)

2. Drag the Fill Handle down to get all codes of specific characters.

Tips:

1. You can directly enclose the text in the formula with double quotation marks.
=CODE("Office")

2. The UPPER function and the LOWER function can help case-sensitive returning a numeric code for a character.
=CODE(LOWER(A1))
=CODE(UPPER(A1))


Excel Productivity Tools

Ribbon of Excel (with Kutools for Excel installed)

300 Advanced Features Help You To Stand Out From Crowd

Would you like to complete your daily work quickly and perfectly? Kutools for Excel brings 300 powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) and save 80% time.

  • Designed for 1500 work scenarios, helps you solve 80% Excel problems.
  • Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands.
  • Become an Excel expert in 3 minutes. No longer need to remember any painful formulas and VBA codes.
  • 60-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years.

Screen Shot of Excel (with Office Tab installed)

Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Firefox, And New IE

  • Office Tab Increases your productivity by 50% when viewing and editing multiple documents.
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • One second to switch between dozens of open documents!
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.

Be the first to comment.