How to Add a Line Break in an Excel Cell (Including Formulas)
When typing, press Alt+Enter (Control+Option+Return on a Mac) where you want the new line. In a formula, insert the line break character CHAR(10).
Formula to use
=A2 & CHAR(10) & B2A2 and B2 on two lines
Turn on Wrap Text to see it
Even with CHAR(10), the text shows on one line if Wrap Text is off for the cell. Click Home > Wrap Text.
Join several cells one per line
TEXTJOIN joins a whole range with a delimiter you set once, and can skip blank cells. TEXTJOIN is available in Excel 2019 and later.
=TEXTJOIN(CHAR(10), TRUE, A2:C2)A2 to C2, one per line
Remove line breaks
Replace line breaks in pasted data with spaces using SUBSTITUTE. In Find and Replace (Ctrl+H), pressing Ctrl+J in the Find what box also finds the line break character.
=SUBSTITUTE(A2, CHAR(10), " ")Line breaks to spaces
Try the functions used here
Change the arguments in the function playground and watch the calculation step by step.
- CHAR functionReturns the character for a character code (1–255).
- TEXTJOIN functionJoins text from several cells with a delimiter between them.
- SUBSTITUTE functionReplaces specific text inside a text with other text.
- CONCAT functionJoins the text from several cells or ranges into one.
- CODE functionReturns the character code of the first character of a text.
FAQ
- How do I check whether a cell has a line break?
- If =ISNUMBER(FIND(CHAR(10), A2)) is TRUE, it has one.
- What is CHAR(10)?
- Character code 10, the line feed (LF) character. It is invisible.