Cellwise Start free

Text function

Excel CHAR function

CHAR returns the character for a code number from 1 to 255. You will mostly use three: CHAR(10) puts a line break inside a formula, CHAR(34) a double quote mark, and CHAR(64+n) the nth letter of the alphabet. For codes above 255 or any Unicode symbol, use UNICHAR (Excel 2013 and later).

=CHAR(number)

Arguments

number
A whole number from 1 to 255. 0, negatives and numbers above 255 return #VALUE!.

CHAR examples

Every result below was calculated from this sample sheet by the same spreadsheet engine the Cellwise app uses.

ABCD
1NameStreetCityGroup
2Rosa Diaz14 Elm StDayton, OH1
3Omar Haddad902 Lake AveToledo, OH3
4Jin Park7 Mill RdAkron, OH2

Download this sheet as an Excel practice file (.xlsx)

  1. =A2&CHAR(10)&B2&CHAR(10)&C2

    Result: Rosa Diaz 14 Elm St Dayton, OH

    A mailing label in one cell, with a line break after the name and the street. The breaks only show once the cell has Wrap Text on (Home > Wrap Text).

  2. ="Group "&CHAR(64+D3)

    Result: Group C

    Turns the number 3 into a letter: 64+3 is 67, the code for C. Handy for labels like Group A, B, C.

  3. ="Ship to "&CHAR(34)&A4&CHAR(34)

    Result: Ship to "Jin Park"

    CHAR(34) is a double quote mark, so the result reads Ship to "Jin Park" without the tangle of doubled quotes.

  4. =SUBSTITUTE(A2&CHAR(10)&B2,CHAR(10),", ")

    Result: Rosa Diaz, 14 Elm St

    The reverse: find each line break and swap it for a comma and a space, which is how you flatten pasted multi-line cells.

Reference: Line breaks in cellsWrap Text

Keyboard shortcut: Type a line break: Alt+Enter

How to use CHAR

  1. Click the cell for the result.
  2. Join CHAR into your formula with &, for example =A2&CHAR(10)&B2.
  3. Press Enter.
  4. For CHAR(10), turn on Wrap Text for the cell so the line break shows.

Common CHAR mistakes

The line break does not show

CHAR(10) is in the cell, but Excel only shows it as a new line when Wrap Text is on. Select the cells and click Home > Wrap Text.

A symbol looks different on another computer

Codes 1 to 127 are the same everywhere. Codes 128 to 255 come from the computer’s character set (Windows-1252 on Windows), so a symbol such as CHAR(149), a bullet on Windows, can differ on a Mac. UNICHAR(8226) gives the same bullet everywhere.

Using CHAR(13) for a new line

Current Excel on Windows and Mac uses CHAR(10) for the line break you get with Alt+Enter. CHAR(13) is a carriage return, not the line break Excel uses inside cells.

CHAR FAQ

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

Join CHAR(10) where the break should go, like =A2&CHAR(10)&B2, then turn on Wrap Text. TEXTJOIN(CHAR(10),TRUE,A2:C2) adds a break between every cell.

What is CHAR(34) in Excel?

A double quote mark ("). Use it to put quotes into a result without doubling them inside a text string.

What is the difference between CHAR and UNICHAR?

CHAR only covers codes 1 to 255 of the computer’s character set. UNICHAR takes any Unicode code, such as UNICHAR(10004) for a check mark, and works the same on Windows and Mac.

How do I find the code of a character?

Use CODE: =CODE("A") returns 65. CODE and CHAR are opposites.

Guides that use CHAR

Related functions

Updated