Char
Syntax:¶
CHAR(number)
- number: A numeric value between 1 and 255 that represents an ASCII code.
Description:¶
The CHAR function in Excel returns the character associated with the specified ASCII code. ASCII (American Standard
Code for Information Interchange) is a character encoding standard that maps numeric values to corresponding characters.
For example:
CHAR(number) = character corresponding to ASCII code `number`
Examples:¶
=CHAR(65)would returnA, because the ASCII code 65 corresponds to the characterA.=CHAR(97)would returna, because the ASCII code 97 corresponds to the charactera.=CHAR(32)would return a space (), as the ASCII code 32 corresponds to the space character.=CHAR(48)would return0, as the ASCII code 48 corresponds to the character0.=CHAR(128)would return the character associated with the extended ASCII code 128.
Notes:¶
- The
CHARfunction is often used for inserting special characters, creating formatted text, and generating character sequences in formulas. - The range of valid inputs is constrained to numbers between 1 and 255. If you provide a value outside this range,
Excel will return a
#VALUE!error. - It is case-sensitive when interpreting characters, as ASCII codes for uppercase and lowercase letters differ (e.g.,
Ais 65, whileais 97). - For non-English locales,
CHARmay return characters from the extended ASCII set specific to the system’s regional settings.