CODE Function. Get the numeric code of a character.(Microsoft Excel)


Japanese version.

What is displayed as a character is also treated internally by the computer as a number.

The CODE function retrieves that numeric value.

This is the opposite of the CHAR function.

How it works

textRequired argument.Specify a string from which to obtain a numeric code.
Only the first character is targeted.


Here is an example of a formula and its result.

If you want to get characters other than the first character, use with the MID function, etc.


Spill if the parameters is a cell range.



Microsoft Excel Functions Text