What is CODE function in Excel?
CODE function is one of TEXT functions in Microsoft Excel that returns a numeric code for the first character in a text string. The returned code corresponds to the character set used by your computer.
|Operating environment||Character set|
|Macintosh||Macintosh character set|
Syntax of CODE function
The CODE function syntax has the following arguments:
- Text Required. The text for which you want the code of the first character.
Example of CODE function
Steps to follow:
1. Open a new Excel worksheet.
2. Copy data in the following table below and paste it in cell A1
Note: For formulas to show results, select them, press F2 key on your keyboard and then press Enter.
You can adjust the column widths to see all the data, if need be.
|=CODE(“A”)||Displays the numeric code for A||65|
|=CODE(“!”)||Displays the numeric code for !||33|