Practice free

CHAR function

CHAR returns the character for a numeric code in your system's character set. It is mostly used to insert line breaks, with code 10, inside a formula.

Example

Read it as a sentence: show the character for code number 65, which is A.

Practice this in the app

Syntax

CHAR(number)

number (required)
A character code from 1 to 255.

Returns: The single character for that code.

What Excel actually returns

Each formula below was run in desktop Excel. The result is exactly what the cell showed, errors included.

FormulaExcel showsCase
=CHAR(65) A A
=CHAR(10) Line feed
=CHAR(160)   Non-breaking space
=CHAR(255) ÿ Last code
=CHAR(128) € Code page 1252 euro slot
=CHAR(65.9) A Fractional
=CHAR(0) #VALUE! Zero
=CHAR(256) #VALUE! Past 255

Watch out for

  • Only 1 to 255; use UNICHAR for anything higher.
  • A line break from CHAR(10) only shows if Wrap Text is on.

Where it works

Excel
CHAR is in every version of Excel from 2007 on.
Google Sheets
Same name, same behaviour for everyday use.

Part of Text functions. Every result on this page was measured in desktop Excel, build 16.0.20527. Last updated .