CODE

Returns the ASCII code which corresponds to the character in a given position within a string.

Syntax

CODE(String, Location)

String is a string. Location is the position within the string of the character in question. The first character of a string has location 1, the second, location 2 and so on. Location must be a positive integer.

Example

This example returns 49:

CODE('3121', 2)

This example returns 49:

CODE('1', 1)

This example returns 97:

CODE('iacta', 2)

This example returns 97:

CODE('a', 1)