
The Excel CHAR function returns the character that matches a numeric code. For example, =CHAR(65) returns "A". It is the reverse of CODE.
CHAR is often used when a formula needs a character that is awkward to type directly, such as a line break or a special symbol. The best-known example is CHAR(10), which inserts a new line inside a cell.
Returns a character from a numeric code in the computer character set.
Returns one character as text. Invalid codes return an error.
=CHAR(number)
number is the code you want to convert. In Excel, CHAR is usually used with values from 1 to 255. If the code is outside the valid range for CHAR, the formula returns an error.
CHAR works with traditional character codes, while UNICHAR is the modern Unicode version. CODE and CHAR also work as opposites: CODE gives you the number for a character, and CHAR turns that number back into the character.
| Function | Main Role | Use When |
|---|---|---|
CHAR |
Code to character | You need a standard character such as a line break or degree symbol |
CODE |
Character to code | You want to identify the code of the first character |
UNICHAR |
Unicode code to character | You need a wider range of symbols than CHAR provides |
The most common use of CHAR is adding a line break in a formula. You cannot press Enter directly inside a text formula, but CHAR(10) inserts the line break character for you. To see it properly, the cell usually needs Wrap Text enabled.
CHAR is also useful for symbols such as quotation marks, tabs, and degree signs. In these cases, it can be easier and safer to use the code than to type the character directly inside a long formula.
CHAR(10) for a line break inside a formula.This is the direct use of CHAR. A numeric code is converted into its matching character.
=CHAR(65) // "A"
=CHAR(97) // "a"
=CHAR(48) // "0"
In cell F1, use CHAR to get the character for number 65. Expected result: "A".
This is the CHAR example most Excel users meet first. The formula joins two values with a line break so they appear on separate lines inside one cell.
="Hello"&CHAR(10)&"World"
=TEXTJOIN(CHAR(10),TRUE,A1:A5)
In cell F2, join "Hello" and "World" with a line break between them. Formula: ="Hello"&CHAR(10)&"World".
CHAR can insert symbols into labels and measurements. That makes it useful when a formula should produce a finished text result such as a temperature reading.
=B3&CHAR(176)&"C" // 25°C
=CHAR(34)&"Quoted"&CHAR(34)
In cell F3, use CHAR to add a degree symbol after the number in B3. Formula: =B3&CHAR(176)&"C".
The code does not have to be typed directly into the formula. You can store it in another cell and let CHAR read it there.
=CHAR(C4)
// If C4 = 36, the result is "$"
In cell F4, use CHAR to get the character for the number stored in C4. Formula: =CHAR(C4).
Codes above the basic range can vary more by platform and font. If you need a symbol that should be consistent across modern systems, UNICHAR is usually the better choice.
CHAR converts a numeric code into a character.=CHAR(number).CHAR(10) when a formula needs a new line inside one cell.Tell your friends about this post