#198-How to use CODE Function in Excel


How to use the CODE Function in Excel

Description
The CODE Function is categorized as Text Function in Excel. This function returns a numeric code for the first character of the given text. The returned code corresponds to the character set used by the computer. The Windows operating system uses ANSI character set and Macintosh uses Macintosh character set.
The CODE function takes one argument which can be a text string or any cell reference or a number. It can also be used as a part of a formula.

Syntax
The syntax of CODE function is =CODE(text)

Argument or Parameter
text (Required)- can be a text string or cell reference or a number for which we want the code of first character.

Returns
The CODE returns a numeric code which represents the first character of the given text or number.

Example
Example-1
In the example given below, we can see in column A we have uppercase letters and in column D we have lowercase letters and right side of each column we the character code of each letter. Here we used CODE function to get the code of single letter. See the image below.


Example-2
In this example, we have used single and multiple word text to get the numeric code of the first character of the text string. In column A, we have the the words and in column B we have the numeric code returned by the CODE function. You can compare this example with the first example, you will get that function returns the same code if the first character is same.


Example-3
In this example, we have used some special characters to the numeric code.


Notes
  • It returns the numeric code of the first character of the given text.
  • It return #Value, if argument left blank.
  • CHAR function does the opposite of CODE.
  • Text argument to the function can be given as cell reference and directly using the quotation marks. 

********************************* ~:Support Our Work Financially:~ *********************************
Project File Type: Free
If you think this tutorial helps you to solve your problem and add value to your work, Buy me a Coffee..
buy me a coffee

************************************************************************************************


TEXT FUNCTIONS FUNCTIONS

BAHTTEXT

CHAR

CLEAN

CODE

CONCATENATE

DOLLAR

EXACT

FIND

FIXED

LEFT

LEN

LOWER

MID

NUMBERVALUE

PROPER

REPLACE

REPT

RIGHT

SEARCH

SUBSTITUTE

T

TEXT

TRIM

UNICHAR

UNICODE

UPPER

VALUE

 

 

 

Post a Comment

0 Comments