The CODE Function in Excel returns a numeric code for a given character. The CODE Function can be used to understand numeric codes given to the CHAR Function as it is the reverse process of CHAR Function.

➡ What is Code Function in Excel?

The Function that accepts one argument, for the text for which you want a numeric code is called CODE Function. It returns a numeric code for the first character in a text string. The code in Excel is based on the character set used by your computer. The purpose of the CODE Function is to get the code for a character. CODE Function falls under the category of Text Functions in Excel.

➡  What is the Syntax for Code Function?

The syntax to write the CODE Function is-

=CODE (text)

Where,

Text – It is the text for which you want a numeric code

➡ How does the Code Function works?

Let’s look at the CODE function. The CODE function accepts the text and generates the numeric code for it.

➡ Example: 

Find the example given in the picture below. We have a data table with the text and we need to generate the code for each text. Simply write the formula with CODE Function and the cell of the text.

=CODE(A1) where A1 is the cell no

As shown in the picture, we have generated the codes for different types of text.

Code Function in Excel

➡ Where can Code Function be used? 

  • CODE Function can be used to abbreviate the text that contains letters in uppercase
  • To remove specific unwanted characters in Excel, you can use a formula based on the CODE Function along with SUBSTITUTE Function

Recommended Blog:

➡ Top 3 Points to Remember:

  • CODE Function returns a numeric code only for the first character in a text string
  • If you apply the CODE Function on a blank cell, then you will get a #VALUE! Error
  • The number in CODE Function can have the range only from 1 to 255

➡ Conclusion:

This function is a very useful Excel Function as it helps returns the numeric code representing the character. It returns numeric value only. You can also combine this function with other functions as well.

Leave a Reply

Related Tutorials

Connect to Data in Power Query
February 21, 2019
How to use Text to Column in Excel with 4 Difference Example
February 21, 2019
Things you should learn in Excel Course
February 13, 2019
How to use Clean Function in Excel
February 11, 2019
How to use the Excel Choose Function
February 11, 2019
How to use the Excel Column Function
February 11, 2019
How to use Ceiling Function in Excel
January 30, 2019
How to use Char Function in Excel
January 28, 2019
Text To Column in Excel | Split Cells
January 4, 2019
Pivot Tables (Complete Guidelines)
December 27, 2018
Power Bi Dax Deduplication Based On Column
December 17, 2018
Special Character Symbol List with Shortcodes in Excel
December 15, 2018
How to use AVERAGEIFS FUNCTION in Excel
December 10, 2018
How to use AVERAGEIF FUNCTION
December 10, 2018
How to use ABS Function in Excel
December 10, 2018
How to use AND Function in Excel
December 10, 2018
Delete Duplicate in Excel or Remove Duplicate in Excel
November 9, 2018
Excel Formulas and Functions in PDF
September 6, 2018
How To Lock Cells in Excel | Unprotect Excel
August 13, 2018
4x Faster at Excel
August 6, 2018
Separate Content of One Excel Cells into Separate Columns
August 3, 2018
How to Transpose Excel Columns to Rows | Paste Special Method
July 26, 2018
How to create sparklines in Excel
July 19, 2018
AutoSum in Excel with Shortcut
July 17, 2018
OFFSET Function in Excel
July 6, 2018