Excel Functions Tutorials
- TEXT Functions in Excel
- Char Function In Excel
- CLEAN Excel Function
- CODE Excel Function
- Concatenate Excel Function
- CONCATENATE Formula in Excel
- Concatenate Date in Excel
- Concatenate Excel Columns
- Concatenate Strings in Excel
- Opposite of Concatenate in Excel
- EXACT Excel Function
- FIND Function in Excel
- LEFT Function in Excel
- LEN in Excel
- MID in Excel
- MID Formula in Excel
- PROPER in Excel
- Proper Formula in Excel
- REPT Function in Excel
- RIGHT Function in Excel
- Right Formula in Excel
- Search Function in Excel
- Substitute Function in Excel
- Substring in Excel
- TEXT Function in Excel
- TEXT Formula in Excel
- Trim in Excel
- Trim Formula in Excel
- VALUE Function in Excel
- Value Formula in Excel
- Financial Functions in Excel (17+)
- Logical Functions in Excel (15+)
- Lookup Reference in Excel (44+)
- Maths Functions in Excel (52+)
- Date and Time Function in Excel (22+)
- Statistical Function in Excel (50+)
- Information Functions in Excel (5+)
- Excel Charts (48+)
- Excel Tools (98+)
- Excel Tips (178+)
- VBA (162+)
- Power Bi (35+)
Code Function in excel is a function which is used to find out the code of the character in the string, it finds out the code for the first character only so if we use this formula as =Code(“Anand”) and =Code(“An”) we will get the same result as 65 as the code for character A is 65.
CODE on Excel (Table of Contents)
CODE Function in Excel
The CODE function is one of the advanced functions of Excel. The main purpose of the CODE function is to return the ASCII code of a character of the first character in any cell. ASCII stands for American Standard Code for Information Interchange and it is an encoding standard for characters for electronic interchange. The CODE function is categorized as a Text function in excel and it returns corresponding numeric ASCII value of characters. The CODE Function is not that much popular among excel community but as an excel expert, you should be aware of this function, as you might find it handy in VBA Coding.
CODE Formula in Excel
The CODE Function uses only one parameter:
text: The text parameter is only and a mandatory parameter of CODE Function. This parameter could be one single character, a string or any function which returns a text as a result.
How to Use CODE Function in Excel?
In this section, we will understand the use of CODE Function and will look at a few examples with help of actual data.
It is really easy to use, and as explained in the previous section, CODE Function uses only one parameter.
As you can clearly observe in the output section, the CODE function is returning the ASCII value of corresponding Characters written in the first column. ASCII value of “A” is 65 and “a” is 97. You can easily verify the ASCII values of every character of your keyboard form Internet.
In the above example, we have applied CODE function on cells containing strings, so as you can see in output column, the CODE Function is returning the ASCII value of the first character of the sentence.
In example three, we have used another two functions LOWER and UPPER to use their return value as a parameter of the CODE function. The LOWER function returns the lower case of the character passed as a parameter, similarly UPPER returns the upper case of a character passed as a parameter.
Things to Remember
- It was first introduced in Excel 2000 and is available in all subsequent versions of excel.
- The parameter “text” in CODE Function is mandatory and if it left blank the function will return a #VALUE error which can easily be resolved by providing a proper character or string as a parameter to the function.
- The return type of CODE Function is a numeric value.
- It is actually the inverse of the CHAR function in excel. the CHAR function returns the corresponding character from a numeric ASCII value.
- You might observe a different output than the one shown in our examples on a Mac OS because Mac OS uses Macintosh character set while windows use ANSI character set.
CODE Function in Excel Video
This has been a guide to CODE in Excel. Here we discuss the CODE Formula in excel and how to use CODE function along with excel example and downloadable excel templates. You may also look at these useful functions in excel –