Excel Find and Replace Line Breaks in Cells Easily

How-to basics · Updated November 3, 2026

Excel Find and Replace Line Breaks in Cells Easily

To find and replace line breaks in Excel cells, press Ctrl+H, click in Find what, and press Ctrl+J. The box may look blank; enter a space or leave Replace with empty, then choose Replace All. Select a range first if you want to limit the changes. This works for the line-feed character commonly used for a new line inside an Excel cell.

What a line break in an Excel cell means

A line break is a character stored in the cell’s text, not just a visual formatting effect. For example, a cell might contain “North” followed by a line break and “Division.” Excel displays the two pieces on separate lines in the same cell. A line break can be inserted manually, often with Alt+Enter on Windows, or arrive in data copied from another application.

That is different from Wrap Text. Wrap Text displays long text on multiple lines to fit the column width, but it does not add a line-break character to the text. If a cell looks split only because the column is narrow, replacing line breaks will not change its display; widening the column or changing Wrap Text is the relevant fix. To check, select the cell and look in the formula bar: a manual break can appear there as a jump to another line.

In typical Excel cell text, the break is a line-feed character, represented by CHAR(10) in a formula. Ctrl+J in the Find and Replace dialog specifies that character even though Excel does not show a visible symbol in the input box. This is why the search field can appear empty while still containing the character you want to find.

Find and replace a line break step by step

  1. Select the cells to change. Select a particular range to limit the operation, or click a cell and leave the sheet unselected to search the worksheet.
  2. Open Home > Find & Select > Replace, or press Ctrl+H on Windows.
  3. Click in Find what and press Ctrl+J. The field will usually still look blank.
  4. Click in Replace with. Type one space to join the text with a space, or leave it empty to remove the break without adding a character.
  5. Choose Replace to review matches one at a time, or Replace All to change every match within the search scope.

On Excel for Mac, open the same dialog using Home > Find & Select > Replace; keyboard shortcuts can differ with the keyboard layout and Excel settings. If Ctrl+J does not enter the search character on your Mac, use the dialog and check Excel’s shortcut guidance for your version, or use a formula-based method below. Excel for the web has a more limited feature set than desktop Excel, so the formula approach is a useful alternative if the dialog does not accept the control character.

After replacing, inspect several changed cells, especially if the data contains multiple lines or punctuation around the break. The change is applied to cell contents, so choosing a space can produce a different result from deleting the break.

Choose what should replace the break

The right replacement depends on how the text should read after it becomes one line. A blank replacement joins the text directly; a space preserves a word boundary. For example, removing the break from “Customer” and “Support” produces “CustomerSupport,” while replacing it with a space produces “Customer Support.”

  • Use a space when the lines form ordinary words or phrases. This is usually the safest choice for names, descriptions, and addresses that should read as continuous text.
  • Use nothing when the break separates parts that should touch, such as a deliberately split identifier or a word broken across lines.
  • Use punctuation or another separator when the lines represent distinct items. For example, a comma and a space might suit a short list, but review the resulting text before applying it to many cells.

Replace All processes every matching break, not just the first one in each cell. A cell containing three line breaks will therefore have all three replaced. If the replacement is a space, that can create repeated spaces where there were consecutive breaks. You can decide whether that matters for your data, or clean up extra spaces separately.

Limit the search to the right cells

Decide whether to change one selection, one worksheet, or the whole workbook before replacing. Selecting a range before opening the dialog is a practical way to protect unrelated cells. If you need to search beyond the current sheet, open the dialog’s options and set the search scope to the workbook where available. Check the scope before choosing Replace All; a workbook-wide operation may change cells you did not intend to edit.

Excel’s Find and Replace options can also affect what counts as a match. For example, the dialog can search formulas or values, and options such as matching the entire cell contents are intended for matching the whole value rather than a portion. A line-break search is generally a partial-character search, so do not enable whole-cell matching unless you specifically want cells whose entire content is just the break. If results seem incomplete, reopen the options and review the search scope and settings.

Before a large replacement, save the workbook or make a copy. A normal Replace All can generally be undone immediately with Ctrl+Z on Windows (or Command+Z on Mac), but saving a copy is a better safeguard when the affected range is important or the change is difficult to review.

Use a formula when you want to preserve the original

A formula creates cleaned text in another cell, leaving the source unchanged. This is helpful when you want to compare results, keep an audit trail, or make a repeatable transformation. Suppose A2 contains “North,” a line break, and “Division.” With the original text in A2, enter this in B2:

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

The result is North Division. To remove the break without adding a space, use this formula instead, with the same source cell in A2:

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

The result is NorthDivision. Fill the formula down for other rows, then check the results. If you need to replace the original values, copy the formula results and use Paste Special > Values over the source cells. Keep a copy of the original data until you have confirmed that the transformed text is correct.

For imported data that may contain either line feeds or carriage returns, a nested formula can replace both character types. With the text in A2, this formula changes each to a space:

=SUBSTITUTE(SUBSTITUTE(A2,CHAR(10)," "),CHAR(13)," ")

If A2 contains “North,” a line-feed character, and “Division,” the result is North Division; any carriage-return characters are also replaced. This is a targeted alternative to removing all control characters, and it preserves other text in the cell.

Clean extra spaces and other imported characters

Replacing line breaks with spaces can leave two or more spaces if the source had consecutive breaks or spaces next to a break. Excel’s TRIM function removes leading and trailing ordinary spaces and reduces repeated ordinary spaces between words to one. With the original text in A2, use:

=TRIM(SUBSTITUTE(A2,CHAR(10)," "))

For A2 containing “North,” a line break, and “Division,” the result is North Division. This formula is convenient when repeated spaces are unwanted, but TRIM also changes other repeated ordinary spaces in the text. Avoid it if the spacing itself must be preserved. It does not remove every kind of invisible character, such as a nonbreaking space.

Another option is CLEAN, which removes many nonprinting control characters from text. With the source in A2, =CLEAN(A2) removes line breaks along with other control characters, including characters that may be meaningful in some imported data, such as tabs. It also removes rather than replaces them, so words on opposite sides may join. Use CLEAN when broad control-character cleanup is intended, not when you need precise control over the separator.

Common problems and how to diagnose them

  • The Find what box looks empty. Ctrl+J inserts a nonprinting character, so an empty-looking field is expected. Enter a replacement and try Replace rather than judging the search by what appears on screen.
  • Nothing is found. The cell may only be wrapping visually, or the break may be a different character. Confirm that the cell contains an actual in-cell break. For imported text, try the formula that handles both CHAR(10) and CHAR(13).
  • Words run together. You likely replaced the break with nothing. Undo immediately if appropriate, then repeat with a space in Replace with.
  • Some cells were not changed. Check whether you selected only part of the data, whether the search is limited to the current sheet, and whether search options are restricting matches.
  • The cell still appears on several lines. It may contain other line breaks, or Wrap Text may be showing the text on multiple lines. Check the underlying content and formatting separately.

When you are unsure what is inside a cell, test the cleanup on a copy of one value first. That small check can reveal whether the issue is a real line break, ordinary wrapping, an extra carriage return, or a different nonprinting character. Avoid replacing invisible characters across an entire workbook until the result in representative cells is clear.

Find and Replace, formulas, or manual editing?

Find and Replace is usually the quickest choice for a one-time change across a defined selection. It edits the existing cells directly, so it is efficient but requires care with scope and replacement text. A formula is preferable when you need to preserve the original, compare before and after, or repeat the same cleanup on refreshed data. It takes an extra step to copy results back as values if you ultimately want to overwrite the source.

Manual editing suits a few exceptional cells where each line has a different meaning or needs custom punctuation. Click into the cell, position the cursor at the break, and edit the text; on Windows, Alt+Enter inserts a line break while editing a cell. Manual work is slow for large ranges and can introduce inconsistencies, so use it for exceptions rather than bulk cleanup.

Frequently Asked Questions

What does Ctrl+J do in Excel Find and Replace?
In the Find what field, Ctrl+J enters a line-feed character, commonly used for an in-cell line break. It is invisible in the field, which is why the box may appear blank.

How do I remove a line break without leaving a space?
Use Ctrl+H, put Ctrl+J in Find what, leave Replace with empty, and choose Replace All. If the two parts are separate words, replacing with a space will usually make the result more readable.

Can I replace line breaks in only one column?
Yes. Select the cells in that column that you want to change before opening Replace. Review the selection and search scope before using Replace All.

Why does Find and Replace not find the break?
The text may only wrap because of the column width, or the imported character may differ from a line feed. Try checking a copied example with a formula that handles both CHAR(10) and CHAR(13).

Will replacing line breaks change the cell’s formatting?
Replacing a character changes the cell’s text, not the column width or Wrap Text setting. The text may still display on multiple lines if it wraps or contains other breaks.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

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

Spotted an error in this guide? Let us know.