Excel CHAR Function Examples for Line Breaks and Symbols

Formulas & functions · Updated November 3, 2026

Excel CHAR Function Examples for Line Breaks and Symbols

Excel’s CHAR function converts a character code into its corresponding character; for example, with a first name in A2 and a last name in B2, =A2&CHAR(10)&B2 joins them on separate lines in one cell. CHAR is useful for adding line breaks, punctuation, and other characters to formula-built text, as long as you use a code supported by your computer’s character set.

What the CHAR function does

CHAR takes a number and returns the character associated with that code. Its syntax is =CHAR(number), where number is an integer from 1 through 255. The function is often used with the ampersand (&) operator to combine returned characters with text or cell values. It does not format a cell or change the underlying value; it creates text that can include characters that are awkward to type directly into a formula.

The codes 1 through 127 correspond to the standard ASCII character set, so familiar examples such as 65 for A, 97 for a, and 34 for a double quotation mark are widely consistent. Codes above 127 are part of extended character sets, and their interpretation can depend on the computer’s character set. For characters outside CHAR’s range, or when you need dependable Unicode characters such as many emoji and symbols, use UNICHAR instead.

CHAR is available in Excel for Microsoft 365 on Windows, Mac, and the web. The formula syntax is the same across these versions. The most useful code for ordinary worksheet work is 10, the line-feed character used for an in-cell line break.

Examples for line breaks and multiple lines

To put two pieces of text on separate lines, join them with CHAR(10). With a department in A2 and a location in B2, =A2&CHAR(10)&B2 returns both values in one cell with a line break between them. Select the result cell and choose Home > Wrap Text if the line break is not visible in the grid. You may also need to adjust the row height.

For example, if A2 contains “Customer Support” and B2 contains “Floor 3,” the result displays as two lines in the same cell. The line break is part of the text, not a new worksheet row. If you copy the result into another program, the receiving program may display or interpret that break differently.

You can add more lines by placing CHAR(10) between each item. With a product name in A2, a product code in B2, and a price in C2, =A2&CHAR(10)&"Code: "&B2&CHAR(10)&"Price: "&C2 produces a compact, three-line label. If C2 contains the number 19.99, the formula joins its displayed underlying value as text; use a TEXT formula around the price if you need a particular currency or decimal format.

For multiple cells in a range, a formula can join values and insert a line break between them. With entries in A2:A4, =A2&CHAR(10)&A3&CHAR(10)&A4 puts all three entries into one cell. This approach is straightforward for a small fixed number of cells. For a longer changing list, a dynamic-array or text-joining approach may be more manageable, depending on your Excel version and whether blank entries should be ignored.

Examples for punctuation and symbols

CHAR can insert characters that are meaningful inside formulas or helpful in generated text. For example, code 34 returns a double quotation mark. With a status in A2, ="Status: "&CHAR(34)&A2&CHAR(34) returns a result such as Status: “Ready” using straight quotation marks. This can be useful when assembling a text string, although it does not create typographic curly quotes.

Code 9 represents a horizontal tab. With a name in A2 and a score in B2, =A2&CHAR(9)&B2 inserts a tab character between the values. A worksheet cell may not show a tab as a neatly aligned column; tabs are more useful when text is passed to software that recognizes tab-delimited content. For a readable table inside Excel, separate cells are usually a better choice.

Here are a few standard, easy-to-check codes:

  • =CHAR(33) returns an exclamation mark: !
  • =CHAR(42) returns an asterisk: *
  • =CHAR(45) returns a hyphen-minus: –
  • =CHAR(64) returns an at sign: @
  • =CHAR(65) returns an uppercase A.

These standalone formulas are useful for understanding the function, but CHAR is often more practical as one piece of a larger formula. For instance, CHAR(34) can add quote marks around a value, while CHAR(10) can separate fields visually. The result is still text, so it will not behave like a number or a formatted date unless you convert or process it separately.

Combining CHAR with other Excel functions

CHAR works with concatenation and text functions. Suppose A2 contains a full address with unwanted repeated spaces and B2 contains a note. With the address in A2 and note in B2, =TRIM(A2)&CHAR(10)&B2 trims extra ordinary spaces from the address, then places the note on a new line. TRIM does not remove every kind of invisible character, so it is not a universal cleanup tool for imported data.

You can also use CHAR in an IF formula to add a line only when a second value exists. With a required label in A2 and an optional detail in B2, =A2&IF(B2<>"",CHAR(10)&B2,"") returns the label alone when B2 is blank, or adds the detail below it when B2 contains text. This prevents an unnecessary blank line after the label. The comparison checks whether B2 is an empty string; cells containing spaces are not considered empty by that test.

For a user-entered character code in A2, =CHAR(A2) returns the associated character when A2 contains a valid code from 1 through 255. This can help explain code tables or build simple lookup demonstrations. It is not a way to display every Unicode code point; use UNICHAR for that purpose, with a valid Unicode number.

How to show and preserve line breaks

A CHAR(10) line break can exist in a cell even when the grid appears to show one long line. Select the cell and use Home > Wrap Text to display the text on multiple lines. If only part of the result is visible, increase the row height or use Home > Format > AutoFit Row Height. The Mac ribbon has the corresponding Wrap Text and row-height controls; names or placement can vary slightly with the window size. Excel for the web also supports Wrap Text from the Home tab.

A line break inside a formula result is different from pressing Enter while editing a formula. The former inserts a character into the returned text. The latter confirms the formula or moves the selection, depending on where you are editing. When entering a formula manually, CHAR(10) is a reliable way to request the in-cell line-feed character without relying on a keyboard shortcut.

When you copy a cell containing a line break, pasting into a text editor or another spreadsheet may preserve the break, while a form, database, or export process may remove it or treat it as a record separator. If the text is intended for an email, web page, or CSV file, check the behavior of the destination rather than assuming that the worksheet’s visual layout will carry over unchanged.

Common errors and limitations

CHAR returns #VALUE! if its argument is outside the supported range of 1 through 255 or is not a usable number. Check for an accidental zero, a negative value, or a code greater than 255. A blank cell referenced as the code may be treated as zero and can therefore trigger an error. If codes come from imported data, confirm that the cells contain numbers rather than text that only looks numeric.

A frequent source of confusion is that a line break does not automatically make the row taller or turn on text wrapping. The formula may be correct even if the cell looks unchanged. Enable Wrap Text and adjust the row height before concluding that CHAR(10) failed. Also check that the formula actually includes CHAR(10) between the text pieces, rather than adding a space or omitting the concatenation operator.

Another limitation concerns extended codes. CHAR(169), for instance, is not a portable way to guarantee a particular symbol on every platform because extended character mappings can differ. For a Unicode character, use UNICHAR with its Unicode code point, or insert the character directly if it is available through your keyboard or the operating system’s character picker. This distinction matters when a workbook is shared across Windows, Mac, and other systems.

CHAR compared with UNICHAR

CHAR is suited to the traditional 1–255 character-code range, including common punctuation and control characters such as the line feed. UNICHAR is designed to return a Unicode character and can represent a much broader set of writing systems and symbols. If a character is missing, appears as a box, or changes when a workbook is opened on another computer, switching from an extended CHAR code to UNICHAR may solve the encoding issue, provided the target device has a font that supports the character.

Neither function controls the font, color, alignment, or cell format. Those are separate formatting choices. Nor does CHAR(10) create a new row in a table: it inserts a line break within a text value. Use a worksheet operation or a formula that spills into multiple cells when the goal is to create separate records rather than a multi-line label.

Frequently Asked Questions

What does CHAR(10) do in Excel?
CHAR(10) returns a line-feed character. When concatenated between text values, it creates a line break inside the resulting cell. Turn on Wrap Text if the break is not displayed clearly.

Why is CHAR(10) not moving text to a new line?
Check that the formula places CHAR(10) between the text values, then enable Home > Wrap Text and adjust the row height. The cell may contain the break even when the row is too short to show it.

What is the difference between CHAR and UNICHAR?
CHAR returns characters from the 1–255 code range associated with the computer’s character set. UNICHAR returns Unicode characters, making it the better option for many characters outside that range.

Can CHAR insert a space in a formula?
Yes. CHAR(32) returns a standard space, though typing a space directly between quoted text fragments is usually simpler. CHAR is more helpful when the desired character is a line break, tab, or quote mark.

Does CHAR(10) work in Excel for Mac and Excel for the web?
Yes, CHAR(10) is supported in both. The formula is the same; use the Home tab’s Wrap Text control to make the in-cell line break visible. The exact ribbon layout can differ with the app and window size.

Related

Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.

More in Formulas & functions

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.