ExcelReady
CourseMock testsFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before day one. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Mock tests
  • Function guides
  • Blog

Test prep

  • Excel level test
  • Excel test practice
  • Free screening quiz
  • Certificate

Company

  • About
  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Text
  3. Remove Line Breaks From Cells in Excel

Remove Line Breaks From Cells in Excel

By ExcelReady Team·Updated November 2, 2026·6 min read

The short answer

A line break inside a cell is the character CHAR(10). To remove it with a formula, replace it with a space or comma: =SUBSTITUTE(B2,CHAR(10),", "). To remove it in place, open Find and Replace with Ctrl+H, press Ctrl+J in the Find what box, type a space in Replace with and click Replace All.

Key takeaways

  • A line break in a cell (Alt+Enter) is the line feed character, CHAR(10).
  • =SUBSTITUTE(B2,CHAR(10)," ") swaps each break for a space and keeps the original data untouched.
  • In Find and Replace on Windows, Ctrl+J types a line break into the Find what box.
  • CLEAN deletes line breaks but joins the words together, so use SUBSTITUTE when you need a space.
  • Data from some systems also has CHAR(13). Remove it with a second SUBSTITUTE, then tidy spaces with TRIM.
On this page+
  1. What is a line break in an Excel cell?
  2. Method 1: Remove line breaks with Find and Replace
  3. Method 2: Remove line breaks with SUBSTITUTE and CHAR(10)
  4. Method 3: Remove line breaks with CLEAN
  5. Why some line breaks won't go away (CHAR(13))
  6. How to check whether a cell has a line break
  7. Split the lines into columns instead
  8. Practise it

To remove line breaks in Excel, replace the hidden line break character, CHAR(10), with a space or a comma. You can do it with a formula, =SUBSTITUTE(B2,CHAR(10),", "), or in place with Find and Replace and the Ctrl+J trick. This guide shows both, plus CLEAN, the carriage-return problem that makes some breaks "stick", and how to split lines into columns instead.

All the examples use this address list in A1:B5. Each address has a line break inside the cell:

AB
1CustomerAddress
2Hill & Co12 Hill Road ↵ Leeds
3Patel Ltd4 Mill Lane ↵ York ↵ YO1 7HH
4Brook Cafe88 River Street ↵ Bath
5Nova LabsUnit 3, Park Way ↵ Oxford

The ↵ marks where each line break sits. In Excel you see the text on separate lines when Wrap Text is on.

What is a line break in an Excel cell?#

A line break is a hidden character that starts a new line inside one cell. You add one by pressing Alt+Enter on Windows or Option+Return on a Mac (Control+Option+Return in some versions) while typing. Line breaks also arrive with data copied from websites, emails, forms and other systems.

Excel stores the break as the line feed character, which has the code 10. In formulas you write it as CHAR(10). Because it is a real character, it gets in the way: lookups fail to match, text is hard to sort, and exported CSV files can split one row into two.

Method 1: Remove line breaks with Find and Replace#

Find and Replace changes the cells themselves, so it suits a one-off clean-up. On Windows:

  1. Select the cells to clean, for example B2:B5.
  2. Press Ctrl+H to open Find and Replace.
  3. Click in Find what and press Ctrl+J. Nothing seems to appear, or you see a tiny blinking dot. That is the line break.
  4. In Replace with, type a space (or a comma and a space).
  5. Click Replace All.

If Excel says it found nothing, clear the Find what box completely and press Ctrl+J once more. Pressing it twice searches for two breaks in a row. On a Mac, the formula method below is the most dependable way to target CHAR(10).

Because this overwrites your data, keep a copy first. Undo works (Windows: Ctrl+Z; Mac: Cmd+Z), but only straight away.

Method 2: Remove line breaks with SUBSTITUTE and CHAR(10)#

SUBSTITUTE swaps one piece of text for another, and it can find CHAR(10) like any other character. In C2:

Excel formula
=SUBSTITUTE(B2,CHAR(10),", ")

The result is 12 Hill Road, Leeds. Fill it down (Windows: Ctrl+D; Mac: Cmd+D) and row 3 becomes 4 Mill Lane, York, YO1 7HH, because SUBSTITUTE replaces every break in the cell, not just the first.

The three parts are: the text to clean (B2), what to find (CHAR(10)) and what to put instead (", "). Use " " for a plain space or "" to delete the break with nothing in its place. The SUBSTITUTE function guide covers the optional fourth argument, which replaces only one occurrence, and SUBSTITUTE vs REPLACE explains when to use each.

To replace the original column, copy the results, then paste them over column B as values (Windows: Ctrl+Alt+V; Mac: Ctrl+Cmd+V, then choose Values) and delete the helper column.

Method 3: Remove line breaks with CLEAN#

CLEAN removes non-printing characters, the first 32 codes in the character set, which include the line break. It is quick:

Excel formula
=CLEAN(B2)

But look at the result: 12 Hill RoadLeeds. CLEAN deletes the break without adding a space, so the words run together. Use CLEAN when the breaks sit at the very end of the text, or alongside other junk characters. When the break separates words, SUBSTITUTE is the better choice.

Why some line breaks won't go away (CHAR(13))#

Data from some systems and older files uses two characters for each new line: a carriage return, CHAR(13), followed by a line feed, CHAR(10). If you remove only CHAR(10), the CHAR(13) stays behind. It can look like a stray space or an odd box. Remove both, then tidy the spacing with TRIM:

Excel formula
=TRIM(SUBSTITUTE(SUBSTITUTE(B2,CHAR(13),""),CHAR(10)," "))

The inner SUBSTITUTE deletes the carriage returns. The outer one turns the line feeds into spaces. TRIM then removes any double spaces and spaces at the start or end. The TRIM function guide explains exactly what it removes, and the article on why TRIM doesn't always work covers characters it misses, like the non-breaking space CHAR(160). For a full clean-up routine, see how to clean messy data.

How to check whether a cell has a line break#

Before you clean a big column, check which cells are affected. This returns TRUE when B2 holds a line break:

Excel formula
=ISNUMBER(FIND(CHAR(10),B2))

And this counts the lines in a cell. For the Patel Ltd address in B3 it returns 3:

Excel formula
=LEN(B3)-LEN(SUBSTITUTE(B3,CHAR(10),""))+1

It works by comparing the length of the text with and without its breaks. The same trick counts any character, as shown in how to remove characters in Excel.

Split the lines into columns instead#

Sometimes the lines are useful: street, city and postcode. Rather than removing the breaks, split on them. In Microsoft 365 or Excel 2024:

Excel formula
=TEXTSPLIT(B3,CHAR(10))

This spills 4 Mill Lane, York and YO1 7HH into three cells side by side. In older versions, use Data > Text to Columns, choose Delimited, tick Other and press Ctrl+J in its box.

After you remove the breaks, turn off Wrap Text on the Home tab if the rows still look tall, then double-click a row border to reset the height. For stray spaces left over, see how to remove spaces in Excel.

Practise it#

Practise cleaning text in a live spreadsheet: you'll use TRIM, SUBSTITUTE and CLEAN on messy data, and each formula is checked instantly. Then try the address exercise on this page to remove a line break yourself.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

The address in B2 is on two lines. In C2, use SUBSTITUTE with CHAR(10) to replace the line break with a comma and a space.

fx
ABCD
1
Customer
Address
One line
2
Hill & Co
12 Hill Road Leeds
3
Patel Ltd
4 Mill Lane York YO1 7HH
4
Brook Cafe
88 River Street Bath
5
Nova Labs
Unit 3, Park Way Oxford
6
7
8

Tip: SUBSTITUTE needs the text, what to find and what to put instead: B2, then CHAR(10), then ", " in quotes.

Practise this in a lesson

LessonCleaning messy textFix stray spaces, random capitals and inconsistent separators in imported data with TRIM, PROPER, UPPER, LOWER and SUBSTITUTE.Function guideSUBSTITUTESwap or strip characters with Excel's SUBSTITUTE: clean phone numbers, change one occurrence and count characters with LEN. Practice it live.Function guideTRIMClean imported data with Excel's TRIM: strip leading, trailing and double spaces so lookups and counts work. Examples and live practice.

Frequently asked questions

How do I remove line breaks in Excel?

+

Use =SUBSTITUTE(B2,CHAR(10)," ") to replace each line break with a space, then copy the results and paste them as values. Or select the cells, press Ctrl+H, press Ctrl+J in Find what, type a space in Replace with and click Replace All.

What is CHAR(10) in Excel?

+

CHAR(10) is the line feed character, the same character Excel adds when you press Alt+Enter inside a cell. You can use it in formulas to find, remove or add line breaks.

Why does Find and Replace not find the line break?

+

Make sure you pressed Ctrl+J in the Find what box, and that nothing else is in the box. Nothing appears on screen, or only a tiny blinking dot. If it still finds nothing, the break may be CHAR(13), which a formula can remove.

Does CLEAN remove line breaks?

+

Yes. CLEAN removes non-printing characters, including CHAR(10) and CHAR(13). But it deletes them without adding a space, so 12 Hill Road and Leeds become 12 Hill RoadLeeds.

How do I split a cell at the line breaks instead?

+

In Microsoft 365 or Excel 2024, use =TEXTSPLIT(B2,CHAR(10)) to spill each line into its own cell. In older versions, use Text to Columns with Other as the delimiter and press Ctrl+J in its box.

Sources

  • SUBSTITUTE function - Microsoft Support
  • CLEAN function - Microsoft Support
  • Find or replace text and numbers on a worksheet - Microsoft Support

Written and checked by the ExcelReady Team. First published November 2, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. What is a line break in an Excel cell?
  2. Method 1: Remove line breaks with Find and Replace
  3. Method 2: Remove line breaks with SUBSTITUTE and CHAR(10)
  4. Method 3: Remove line breaks with CLEAN
  5. Why some line breaks won't go away (CHAR(13))
  6. How to check whether a cell has a line break
  7. Split the lines into columns instead
  8. Practise it

Keep reading

Text· 6 min read

How to Remove Spaces in Excel (Extra, Leading, All)

To remove extra spaces in Excel, use =TRIM(A2). It deletes spaces at the start and end and turns double spaces between words into single ones. To remove every space, use =SUBSTITUTE(A2," ",""). If spaces survive both, they are non-breaking spaces from the web: use =TRIM(SUBSTITUTE(A2,CHAR(160)," ")).

Text· 6 min read

How to Remove Characters From Text in Excel

To remove a specific character, use SUBSTITUTE to replace it with nothing: =SUBSTITUTE(A2,"-","") strips every dash. To remove characters by position, use RIGHT(A2,LEN(A2)-3) to drop the first three, or LEFT(A2,LEN(A2)-2) to drop the last two. To remove everything after a character, use TEXTBEFORE or LEFT with FIND.

Text· 6 min read

TRIM Not Working in Excel? Non-Breaking Spaces Explained

TRIM only removes the normal space character, code 32. When TRIM is not working, the cell usually holds a non-breaking space (code 160) copied from a web page, or a line break or tab. Swap it for a normal space first, then trim: =TRIM(SUBSTITUTE(A2,CHAR(160)," ")). Add CLEAN for line breaks and tabs.

More on text

  • How to Remove Numbers From Text in Excel
  • Remove Text After a Character in Excel (Keep the Start)
  • REPT in Excel: Simple In-Cell Bar Charts
  • Sort by Last Name in Excel When Names Are in One Column
  • How to Split an Address Into Columns in Excel
  • How to Split First and Last Names in Excel
All text articles →

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback, right in your browser. Nothing to download.

Start learning for free