Spreadsheet Practice

CHAR function

Quick answer

CHAR returns the character for a code number.

Syntax
=CHAR(number)
Most common use
=A2&CHAR(10)&B2 returns 12 Oak St Duluth, MN (A two-line address; turn on Wrap Text to see the break)

Its everyday use is CHAR(10), the line break, which lets a formula put text on two lines. It also produces characters that are awkward to type in a formula, like the double quote.

Available in
Every current version
Category
Text functions
Returns
A single character.

Syntax

=CHAR(number)

ArgumentRequired?What it is
numberRequiredA code from 1 to 255. 10 is a line break, 9 a tab and 34 a double quote.

Examples

Each result below is calculated from the sample sheet by our formula engine, the same one that grades the practice.

CellFormulaResultWhat it shows
D2=A2&CHAR(10)&B212 Oak St Duluth, MNA two-line address; turn on Wrap Text to see the break
D3=CHAR(34)&C3&CHAR(34)"Raj"A name wrapped in double quotes
D4=CHAR(65+2)CCodes 65 to 90 are the capital letters, so 67 is C

Try it live

This is the sample sheet. Change any number or text, or edit a formula, and the results update.

Show the sample data as a table
StreetCityNameResult
12 Oak StDuluth, MNMaya12 Oak St Duluth, MN
88 Pine AveFargo, NDRaj"Raj"
5 Elm RdRochester, MNLeeC

Practice CHAR

Graded instantly, then re-checked on changed data.

Two-line labels

In C2, join the name and the job title with a line break between them, using CHAR(10). Fill down to C6.

Common mistakes

What you seeWhy, and how to fix it
The line break doesn't showThe cell needs Wrap Text turned on (Home > Wrap Text), or the break stays invisible.
Different characters on a MacCodes above 127 come from the operating system's character set, so they can differ between Windows and Mac. Stick to codes below 128, or use UNICHAR for a specific Unicode character.

Tips

  • Use CHAR(10) as the delimiter in TEXTJOIN to stack a list in one cell, one item per line.

Questions

How do I add a line break in an Excel formula?

Join with CHAR(10): =A2&CHAR(10)&B2, then turn on Wrap Text for the cell. When typing directly in a cell, press Alt+Enter instead.

What is CHAR(34) in Excel?

The double quote character. It's an easy way to put quotes inside a formula's text without doubling them up.

Answers that use CHAR

In other languages

CHAR is CARACTER in Spanish Excel and ZEICHEN in German Excel. Each page has the syntax with semicolons, the examples and the exercise in that language. For other functions and languages, use the Function Translator.

Updated Checked by running: every formula on this page was run by our formula engine on .