FormulaCraft

How to remove line breaks from a cell in Excel and Google Sheets

Topic:Text manipulation
Excel & Google Sheets
=SUBSTITUTE(A2,CHAR(10)," ")

Verified example

Computed by a real spreadsheet engine on the sample data below.

Multi-line TextCleaned
Hello World
One Two
A B C
Cat Dog
Yes No

=SUBSTITUTE(A2,CHAR(10)," ")Hello World

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

Step by step

  1. 1Click the destination cell (e.g. B2).
  2. 2Enter =SUBSTITUTE(A2,CHAR(10)," ") to replace each line break with a single space.
  3. 3To remove line breaks entirely (no replacement), use =SUBSTITUTE(A2,CHAR(10),"").
  4. 4For cells with both CHAR(10) and CHAR(13) (Windows-style breaks), nest two SUBSTITUTE calls: =SUBSTITUTE(SUBSTITUTE(A2,CHAR(13),""),CHAR(10)," ").

Tips

Need it for your exact data?

Describe your columns in plain English and get the precise formula for your sheet, with the right Excel or Sheets syntax.

Frequently asked

Why does my cell still show multiple lines after the formula?

The formula result lives in a new cell — make sure you are looking at the formula cell, not the source. Also check that Wrap Text is enabled only on the source column.

Does this work the same in Excel and Google Sheets?

Yes — CHAR(10) represents a newline in both applications and SUBSTITUTE is identical.

More on Text manipulation

See all →

Formulas used

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: