Text

CHAR Formula

CHAR returns the character specified by a numeric ASCII/ANSI code. It is commonly used to insert special characters into formulas — especially line breaks (CHAR(10)), tabs (CHAR(9)), and characters that are difficult to type directly.

Syntax

CHAR(number)
ParameterDescription
number Parameter of the CHAR function.
Try CHAR in Viztab — free, no signup

Examples

Insert line break in cell

Formula
=A1 & CHAR(10) & B1
Concatenates A1 and B1 with a line break between them. Enable "Wrap text" on the cell to see both lines.

Generate alphabet letters

Formula
=CHAR(64+ROW())
In row 1 returns "A" (CHAR(65)), row 2 returns "B" (CHAR(66)), and so on. Useful for creating letter sequences dynamically.

Add tab character

Formula
=A1 & CHAR(9) & B1
Inserts a tab between two values. Useful when building tab-delimited output within a formula.

Common Errors

#VALUE!

Occurs when the number is outside the valid range (1-255 for CHAR). Use UNICHAR for code points above 255.

#NUM!

Some implementations return #NUM! instead of #VALUE! for out-of-range numbers like 0 or negative values.

Tips

Key codes to memorize

CHAR(10) = line feed, CHAR(9) = tab, CHAR(13) = carriage return, CHAR(34) = double quote, CHAR(65) = A, CHAR(97) = a.

Insert double quotes in strings

Use CHAR(34) to embed literal double quotes: ="Price is " & CHAR(34) & A1 & CHAR(34) produces Price is "50".

Pair with CODE

CODE is the inverse of CHAR. =CODE("A") returns 65, and =CHAR(65) returns "A". Useful for character math.

Try CHAR in Viztab

Import your data and use CHAR with 370+ other formulas. No signup required.

Open Viztab

Related Formulas