# How to Use Excel CODE Function?

Excel CODE Function: We all know that Excel has numerous features to perform various mathematical operations. On that note, the CODE function is a built-in function in Excel that is categorized as a String/Text Function. returns the numeric code of the given character.

This article describes the explanation, syntax, and usage of the CODE function in Excel. Get the official version of MS Excel from the following link:

https://www.microsoft.com/en-in/microsoft-365/excel

## Explanation of CODE Function

• It is one of the built-in functions in Excel.
• The CODE Function in Excel returns a numeric code for the first character in a text string.
• This Function takes out the text or a character that displays the output in a numeric code form.

## Syntax

• Here, you will see the syntax of the CODE function.
• To apply this function on your spreadsheet, you have to select a cell and enter the formula in the following format.
• Once you enter the formula, just click on the button to get the result.

=CODE(text)

Argument Description:

• Text – The text for which you want a numeric code.

## Practical Examples

Let’s look at the examples of the CODE function and explore how it works in the Excel worksheet.

• Initially, you have to open your Excel workbook on your PC and launch a worksheet that has data.
• For example, we have entered a letter in Cell B3, and we are going to get the numeric code value for this input.
• Now, we need to enter the above-mentioned formula to get the result.
• After entering the formula, you need to click the button to get the output, as shown below.
• In the following image, you will see a range of input text strings, and we will get the code value for those values using the CODE function.
• Once you get the first value, you can simply drag down the cell to fill the remaining values, as shown in the below image.
• If you give the text string, then the CODE function will return the code value for the first letter in the string.