Char function


Char


This module demonstrates the Excel CHAR function with application to the standard (0 to 127) and extended (128 to 255) ASCII characters.



Char worksheet function



Fig 1: Excel Web App #1: CHAR function with character codes 1 to 255.

Example


Formula Description Returns
=CHAR(65)Returns the character specified by the number code 65 A
=CHAR(97)Returns the character specified by the number code 97 a
=CHAR(163)Returns the character specified by the number code 163 £
=CHAR(169)Returns the character specified by the number code 169 ©

The Excel CHAR function is not available in VBA, use the VBA CHR function instead.


To return the code of a character, use the Excel CODE function. eg. =CODE("a") returns 97, and =CODE(8) returns 56