ID EN
#Text

CHAR

Excel Functions

Get a character from a number

Syntax

EXCEL
=CHAR(number)

Arguments

Parameter Description
number A number between 1 and 255.

Return Value

A single character specified by a number.

Details

The CHAR function returns a character when given a valid character code. Use the CHAR to translate ASCII code page numbers into actual characters. For example: the CHAR function takes just one argument, number, which must be an integer between 0-255. The result from CHAR is a text value. The CHAR function was designed to operate in an ASCII/ANSI world and only understands numbers 0-255. For extended character support on modern Unicode systems, see the UNICHAR function. CHAR can be useful when you want to specify characters in formulas or functions that are awkward or impossible to type directly. For example, you can use CHAR(10) to add a line break in a formula like this: Notes: Text wrap must be enabled to see the line break take effect. Older versions of Excel on the Mac use character 13

Examples

Example 1

The CHAR function returns a character when given a valid character code. Use the CHAR to translate ASCII code page numbers into actual characters. For

EXCEL
=CHAR(65) // returns "A"
=CHAR(97) // returns "a"
Example 2

CHAR can be useful when you want to specify characters in formulas or functions that are awkward or impossible to type directly. For example, you can

EXCEL
="line 1"&CHAR(10)&"Line 2" // add line break
Reverse CHAR

To get the numeric code for a character, you can use the CODE function:

EXCEL
=CODE("A") // returns 65

See Also

CHAR UNICHAR CODE UNICODE