The CHAR function returns the character relating to a supplied number within the character set used by a computer.
Note: The character encoding used may vary across different operating systems and so the CHAR function may return different results on different computers.
|number||A number between 1 and 255 specifying which character you want. The character is from the character set used by your computer|
|2||=CHAR(65)||A||Uppercase “A” = ANSI # 65|
|3||97||=CHAR(A3)||a||Lowercase letters are uppercase + 32|
|4||=CODE(“B”)||=CHAR(A4)||B||CODE returns 66, which CHAR converts to “B”|
|=CHAR(CODE(“B”))||B||CODE returns 66, which CHAR converts to “B”|
|Adding line breaks with CHAR(10) = new line (see below)|
Usage note: CHAR can be useful when you want to specify characters in formulas or functions that are awkward or impossible to type directly. For example:
- CHAR(10) produces a line break in a formula on Windows, and
- CHAR(13) produces a line break on the Mac
Common Function Error(s)
|Problem||What went wrong|
|#VALUE!||Occurs if the supplied number argument is not recognized as a numeric value or is a number outside of the permitted range 1 to 255|