The direct answer: in Excel, a hard return inside a cell (a line break) is inserted with Alt+Enter on Windows or Control+Option+Return on Mac. To create a hard return within a formula, you use the CHAR(10) function (or CHAR(13) on older Mac Excel) joined with the ampersand (&) or the TEXTJOIN function. This article explains both methods, how to make them work with wrapped text, and common pitfalls.
What Is a Hard Return in Excel?
A hard return is a manual line break that forces text to start on a new line within the same cell. It differs from a soft return (automatic wrapping) which Excel applies when text exceeds the column width and the cell has Wrap Text enabled. Hard returns are stored as part of the cell’s text, so they appear in formulas, when copying, and when using text functions. They are essential for creating multi-line addresses, lists, or readable concatenated strings.
How to Insert a Hard Return Manually
To add a line break while typing or editing a cell:
- Click into the cell, press F2 to edit, then press Alt+Enter (Windows) or Control+Option+Return (Mac) at the point where you want the break.
- If you are entering text in the formula bar, the same shortcut works.
- After inserting, ensure the cell has Wrap Text enabled (Home > Alignment > Wrap Text) so the break displays correctly; otherwise the text may appear on one line with a small square symbol.
Using CHAR(10) to Add a Hard Return in a Formula
When building a formula that joins text, you can insert a line break using the CHAR function. In Windows Excel, CHAR(10) returns a line feed (LF). On older Mac Excel (before 2016), CHAR(13) (carriage return) was used, but modern Excel for Mac also uses CHAR(10).
Example: Suppose you have a first name in A2 and a last name in B2. To combine them on two lines:
=A2 & CHAR(10) & B2
If A2 contains “John” and B2 contains “Doe”, the result displays as:
John
Doe
But only if the cell has Wrap Text enabled. Without it, you will see the text on one line with a small square symbol where the break is.
Using TEXTJOIN for Multiple Line Breaks
If you need to combine several cells with line breaks, TEXTJOIN is cleaner. It is available in Excel 2019, Excel 2021, and Microsoft 365.
Example: With items in A2:A5, to list them each on a new line:
=TEXTJOIN(CHAR(10), TRUE, A2:A5)
The first argument is the delimiter (line break), the second is TRUE to ignore empty cells, and the third is the range. If A2:A5 contains “Apples”, “Bananas”, “Cherries”, “Dates”, the result is:
Apples
Bananas
Cherries
Dates
How to Make Line Breaks Visible: Wrap Text and Row Height
Even after inserting a hard return, the line break may not show if the cell does not have Wrap Text enabled. To display multiple lines:
- Select the cell or range.
- Go to Home > Alignment > Wrap Text (or press Alt+H, W on Windows).
- If the row height does not adjust automatically, double-click the bottom border of the row header to auto-fit the height, or manually drag it.
Without Wrap Text, Excel shows the text on a single line and may display a small square symbol (or the break is ignored when printing).
Common Problems and Fixes
Here are typical issues users encounter with hard returns in formulas:
- Line break not showing: Check Wrap Text is on. Also ensure the row height is not fixed; auto-fit by double-clicking the row boundary.
- CHAR(10) appears as a square or is invisible: This happens when the font or cell format does not support line feeds, or Wrap Text is off. Change the font to a standard one like Calibri or Arial.
- Hard return disappears after editing: If you press Enter instead of Alt+Enter, you exit the cell. Always use the shortcut.
- Formula returns #VALUE! when using CHAR(10) with certain functions: This can occur if you are using an array formula incorrectly. Ensure you are not mixing text and numbers in a way that causes a type mismatch.
- Line breaks not preserved when copying to another program: When you copy a cell with line breaks, the breaks are preserved as newline characters. If they disappear, check the destination’s text import settings.
Hard Return vs. Wrap Text: What’s the Difference?
A hard return is an explicit character in the cell’s content. Wrap Text is a display setting that automatically breaks lines at the cell boundary. They are often confused:
- Hard return: You control exactly where the break occurs. It remains even if the column width changes.
- Wrap Text: Excel decides where to break based on the column width. If you widen the column, the break points move.
For example, if you type “Hello World” in a cell with Wrap Text on and narrow the column, it may break after “Hello”. If you instead type “Hello” then Alt+Enter then “World”, it will always break after “Hello” regardless of column width.
Frequently Asked Questions
How do I remove a hard return from a cell?
To remove all line breaks from a cell, you can use the CLEAN function, which removes non-printable characters, including CHAR(10). For example, if the text is in A1, use =CLEAN(A1). Alternatively, use Find and Replace: press Ctrl+H (Windows) or Cmd+Shift+H (Mac), in the “Find what” box press Ctrl+J (Windows) or Cmd+J (Mac) to insert a line break character, leave “Replace with” empty, and click Replace All.
Can I use a hard return in a formula that also uses CONCATENATE?
Yes. The CONCATENATE function (or the & operator) works fine with CHAR(10). For example, =CONCATENATE(A2, CHAR(10), B2) produces the same result as the ampersand version. However, TEXTJOIN is more efficient for ranges.
Why does my line break show as a small square in the cell?
That square is the visual indicator of a line feed character when Wrap Text is off. To see the actual line break, enable Wrap Text. The square does not appear in the printed output if Wrap Text is on.
Does Alt+Enter work in Excel for the web?
Yes, in Excel for the web, you can insert a line break by pressing Alt+Enter on Windows or Option+Enter on Mac. The same CHAR(10) formula works in the web version.
Can I use CHAR(10) in a formula that is part of a chart title or axis label?
Yes, but you need to reference a cell that contains the formula. For example, put ="Sales" & CHAR(10) & "2024" in a cell, then set the chart title to that cell. The line break will appear if the chart title has Wrap Text enabled (which it does by default).
Is there a way to add a hard return in a formula without using CHAR(10)?
You can use the UNICHAR(10) function, which also returns a line feed, but CHAR(10) is simpler and works in all versions. There is no other built-in constant for a line break.