Part of the free Module 5: Excel Formulas and Functions · Function 8 of 105 · Full Excel course
The Excel CHAR function returns the character that corresponds to a numeric code between 1 and 255, based on the character set of your computer (Windows-1252 on Windows). It is most often used to insert characters you cannot type easily, such as a line break inside a formula, a non-breaking space or a bullet symbol.
Syntax
=CHAR(number)
Arguments
| Argument | Required / Optional | Meaning |
|---|---|---|
| number | Required | An integer from 1 to 255. Decimals are truncated, so CHAR(65.9) returns the same as CHAR(65). |
Useful character codes
| Formula | Result | Typical use |
|---|---|---|
| =CHAR(10) | Line feed | Line break inside a joined text (Windows). Turn on Wrap Text to see it. |
| =CHAR(13) | Carriage return | Line break on Excel for Mac; also appears in data pasted from other systems. |
| =CHAR(32) | Space | Explicit space when building strings. |
| =CHAR(65) to CHAR(90) | A to Z | Generate letter sequences. |
| =CHAR(97) to CHAR(122) | a to z | Lower-case letter sequences. |
| =CHAR(149) | Bullet | Bulleted lists built by formula. |
| =CHAR(160) | Non-breaking space | Common in web data; TRIM does not remove it. |
Step-by-step example: address on two lines
- Put a street address in A2 and a city in B2.
- In C2 enter
=A2&CHAR(10)&B2. - Select C2 and turn on Home > Wrap Text. Without Wrap Text the line break is stored but not displayed.
- Fill the formula down. Each cell now shows the street on the first line and the city on the second.
Practical use cases
1. Build a letter list
=CHAR(ROW(A1)+64)
Entered in the first row and filled down, this returns A, B, C and so on. Use it for column labels or option keys.
2. Remove non-breaking spaces from web data
=TRIM(SUBSTITUTE(A2,CHAR(160)," "))
Text copied from web pages often contains CHAR(160). SUBSTITUTE swaps it for a normal space and TRIM tidies the rest.
3. Replace line breaks with a separator
=SUBSTITUTE(A2,CHAR(10),", ")
Flattens multi-line cells into a single comma-separated line for export.
4. Create a bulleted summary in one cell
=CHAR(149)&" "&A2&CHAR(10)&CHAR(149)&" "&A3
Common mistakes and tips
- #VALUE! error: the number is less than 1 or greater than 255. Codes above 255, such as emoji or check marks, need UNICHAR.
- Line break not visible: CHAR(10) works only when Wrap Text is enabled for the cell.
- Different results on Mac: codes 128 to 255 map to different symbols on the Macintosh character set. Use UNICHAR for consistent output across platforms.
- Finding a code: use CODE on a sample character to discover the number, for example
=CODE("©")returns 169. - CHAR returns text, so
=CHAR(49)+1still works (Excel coerces “1” to a number) but relying on that makes formulas hard to read.
CHAR and the Windows character set
The codes CHAR uses come from the ANSI code page of your operating system, which on most Windows systems is Windows-1252. Codes 32 to 126 are the standard printable characters: digits, letters and punctuation. Codes 128 to 255 hold accented letters and symbols such as the euro sign (128), the copyright sign (169) and the degree sign (176). Codes 1 to 31 are control characters that never print; only 9, 10 and 13 have a practical use in Excel. Because the upper range differs between Windows and Mac, a formula that returns the bullet symbol with CHAR(149) on Windows returns a different character on a Mac. When a workbook is shared across platforms, use UNICHAR(8226) for a bullet, UNICHAR(8364) for the euro sign and UNICHAR(176) for degrees, which are identical everywhere.
Related functions
- CODE: the reverse of CHAR; returns the numeric code of the first character.
- UNICHAR: returns the Unicode character for any code point, including symbols and emoji.
- SUBSTITUTE: replaces specific characters, often paired with CHAR.
- CLEAN: removes non-printing characters with codes 0 to 31.
- See all lessons in the Excel Formulas course.
Frequently asked questions
How do I insert a line break with the CHAR function?
Join the text with CHAR(10) on Windows, for example =A2&CHAR(10)&B2, and enable Wrap Text on the cell so the break is displayed.
What is the difference between CHAR and UNICHAR?
CHAR covers codes 1 to 255 from the local character set. UNICHAR accepts any Unicode code point, so it can return symbols, non-Latin letters and emoji.
Why does CHAR return #VALUE!?
The number is outside the range 1 to 255, or the argument is text that cannot be read as a number.
Need a ready-made template? Browse 7,000+ Excel, Power BI and Google Sheets templates at NextGenTemplates.com.