Contact

CHAR Function in Microsoft Excel: Examples, Pitfalls & Compatibility

Text Beginner Microsoft Excel

CHAR in Microsoft Excel: construct a character from a numeric code, with a critical distinction between Excel code pages and Sheets Unicode. Includes worked examples and application-specific cautions.

Verification status: Official documentation referenced; example outcomes independently reasoned or arithmetically checked where stated. Not executed in Microsoft Excel. How formula examples are checked

Quick answer: Use CHAR in Microsoft Excel to construct a character from a numeric code, with a critical distinction between Excel code pages and Sheets Unicode. The official CHAR reference is the source for the function definition and platform-specific rules described below.

Syntax and arguments

=CHAR(number)

number (required): A numeric character code. The accepted code system depends on the application; see the platform note below.

Examples use English function names, comma argument separators and decimal points. Adapt formula separators to your workbook settings, not punctuation inside quoted text.

When to use it

Use CHAR to insert a known separator or control character into a formula. It is also useful when a character is awkward to type directly. Do not assume that every numerical code has the same meaning across platforms, operating systems and fonts.

Three worked examples

Each example is independent. Where input cells are listed, enter those values first; otherwise the formula is self-contained. Expected outputs are independently checked calculations or documented error expectations, not captured results from Microsoft Excel.

Example 1: Generate an ASCII letter

=CHAR(90)

Expected result: "Z" (quoted here to make spaces and text boundaries visible).

Code 90 is the ASCII capital Z. This example stays within the common subset of the relevant character sets.

Example 2: Join two labels with a line feed

="Shelf"&CHAR(10)&"B"

Expected result: "Shelf\nB" (the \n notation represents a line feed in the stored string).

The stored string contains a line feed between Shelf and B. Its visible layout depends on the cell display; the result is not a literal backslash and n.

Example 3: Move between known ASCII codes

=CHAR(CODE("B")+2)

Expected result: "D" (quoted here to make spaces and text boundaries visible).

CODE returns the code of B, adding 2 reaches D in this known ASCII sequence. Do not generalize this arithmetic to arbitrary alphabets.

Put it to work safely

Document why a code is used instead of leaving an unexplained number inside a long formula. For a line feed, first build a short two-part label and confirm the string before formatting the final report. A valid character can still be displayed as a missing-glyph box when the chosen font lacks it. Keep a plain-text alternative for important status symbols.

Common mistakes and fixes

A valid character is not visible. Some codes describe controls such as a line feed, not a printable glyph. Check the string length or use a known printable code as a diagnostic.

A symbol changes after moving the workbook. Check which character-code system the formula expects. Excel CHAR is not a general Unicode equivalent of Google Sheets CHAR.

A square box appears instead of a symbol. The display font or device may not provide the requested glyph. This alone does not prove that the formula produced a different code.

Microsoft Excel-specific notes

Excel CHAR uses codes 1 through 255 from the computer character set. Microsoft distinguishes Windows ANSI and the Macintosh character set. Its web-client note also limits supported control codes. Use a Unicode-specific function rather than assuming CHAR accepts an arbitrary Unicode code point. See the vendor reference for the current definition.

Excel and Google Sheets comparison

The portable part of these examples is the ASCII subset and the deliberately chosen line feed. A Sheets CHAR call with a larger Unicode code point cannot simply be copied into Excel CHAR and assumed equivalent.

Compare the CHAR guide for Google Sheets and its official documentation. Having a guide in both libraries establishes two documented references, not a certificate of identical behavior across releases, locales or file conversions.

Evidence and testing scope

Editorial verification: Official references retrieved on 2026-10-12. The three worked cases are included in this release’s reproducible Python checking suite. It checks the stated arithmetic, calendar or text model and the expected documented error classification; it is not the Microsoft Excel calculation engine. No native application run, UI screenshot, maximum-size benchmark or cross-version certification is claimed. Review the editorial testing standards before relying on a formula in a critical workbook.