CHAR function
Quick answer
CHAR returns the character for a code number.
- Syntax
=CHAR(number)- Most common use
=A2&CHAR(10)&B2returns 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)
| Argument | Required? | What it is |
|---|---|---|
number | Required | A 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.
| Cell | Formula | Result | What it shows |
|---|---|---|---|
| D2 | =A2&CHAR(10)&B2 | 12 Oak St Duluth, MN | A 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) | C | Codes 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
| Street | City | Name | Result |
| 12 Oak St | Duluth, MN | Maya | 12 Oak St Duluth, MN |
| 88 Pine Ave | Fargo, ND | Raj | "Raj" |
| 5 Elm Rd | Rochester, MN | Lee | C |
Practice CHAR
Graded instantly, then re-checked on changed data.
Two-line labels
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 see | Why, and how to fix it |
|---|---|
| The line break doesn't show | The cell needs Wrap Text turned on (Home > Wrap Text), or the break stays invisible. |
| Different characters on a Mac | Codes 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
- How to extract text after the nth occurrence of a character in Excel
- How to find the position of the nth occurrence of a character in Excel
- How to find the position of the last occurrence of a character in Excel
- How to split text by line break in Excel
- How to count the number of lines in a cell in Excel
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 .