Insert Special Characters with CHAR & CODE

Excel Formulas › Text

All versionsCHARCODE

CHAR turns a number into its character — a line break, a bullet, a degree sign — and CODE does the reverse. They’re how you insert characters you can’t easily type and inspect mystery characters in messy data.


Quick formula: to insert a line break inside a formula:
=A2 & CHAR(10) & B2
CHAR(10) is the line-feed character; join it between values (and turn on Wrap Text) to stack them on two lines.

Functions used (tap for the full reference guide):

The example

Common CHAR codes and what they produce.

AB
1FormulaResult
2CHAR(10)line break
3CHAR(176)° (degree)
4CHAR(8226)? → UNICHAR(8226)• (bullet)
5CODE("A")65

The formula

A line break joined between two cells:

=A2 & CHAR(10) & B2 // stacks A2 over B2 (Wrap Text on)

How it works

CHAR and CODE convert between numbers and characters:

  1. CHAR(n) returns the character for code nCHAR(10) is a line break, CHAR(176) is the degree sign, CHAR(9) is a tab.
  2. CODE("A") returns the number for a character — 65 — handy for spotting stray invisible characters (CODE(LEFT(A2))).
  3. For characters beyond the basic 255 (emoji, bullets, arrows), use UNICHAR and UNICODE — e.g. UNICHAR(8226) is a bullet.
  4. Remember to enable Wrap Text for CHAR(10) line breaks to actually show.

Diagnose “invisible” characters: if a lookup fails, =CODE(RIGHT(A2)) on a suspect cell often reveals a trailing 160 (non-breaking space) or 10 (line break) hiding in your data.

Try it: interactive demo

Live demo

Enter a code number; see the character (and its CODE back).

Character:

Variations

Bullet list in one cell

Bullets + line breaks (Wrap Text on):

=UNICHAR(8226)&" "&A2&CHAR(10)&UNICHAR(8226)&" "&B2

Degree or other symbol

Append a degree sign:

=A2 & CHAR(176)

Find a hidden character

Code of the last character:

=CODE(RIGHT(A2,1))

Pitfalls & errors

CHAR(10) needs Wrap Text. Without it, the line break is there but the cell shows everything on one line.

CHAR only goes to 255. For higher code points (bullets, arrows, emoji), use UNICHAR/UNICODE instead.

Codes differ by system slightly above 127 (Windows vs Mac). Stick to UNICHAR for portable symbols.

Practice workbook

📊
Download the free Insert Special Characters with CHAR & CODE practice workbook
CHAR/CODE/UNICHAR examples (line break, degree, bullet, find-hidden-char) with results, plus 4 challenges with answers. No sign-up required.

Frequently asked questions

How do I add a line break inside a formula in Excel?
Use CHAR(10): =A2 & CHAR(10) & B2 inserts a line feed between values. Turn on Wrap Text for the break to display.
How do I insert a special character like a bullet or degree sign?
Use CHAR for codes up to 255 (=CHAR(176) is °) or UNICHAR for higher code points (=UNICHAR(8226) is a bullet).
How do I find an invisible character causing a lookup to fail?
Use CODE or UNICODE on a suspect character, e.g. =CODE(RIGHT(A2,1)), which often reveals a 160 (non-breaking space) or 10 (line break).

Stop fighting formulas. Learn them in a day.

This recipe is one of hundreds of real-world formulas we teach. Our Excel Formulas & Functions class covers lookups, logic, text, and dynamic arrays hands-on — live in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.

See the Formulas & Functions Class

Related formulas: Clean up messy text · Join text with a delimiter · Repeat text for in-cell bars

Function references: CHAR · CODE · UNICHAR