Excel Find and Replace Carriage Returns: Steps and Fixes

How-to basics · Updated November 3, 2026

Excel Find and Replace Carriage Returns: Steps and Fixes

In Excel for Microsoft 365 on Windows, press Ctrl+H, click the Find what box, and press Ctrl+J to search for a cell line break; enter the replacement in Replace with, then choose Replace All. This finds the line-feed character Excel commonly uses for in-cell breaks—not necessarily a carriage return, which may need to be cleaned with a formula.

Carriage returns and line breaks in Excel

The phrase “carriage return” is often used casually to mean any line break, but the characters have distinct codes. A line feed (LF) is character 10, represented in Excel formulas by CHAR(10). A carriage return (CR) is character 13, represented by CHAR(13). Text from another program or an imported file may contain one character or a CR-LF pair.

Excel’s usual in-cell new line, including one entered with Alt+Enter on Windows, is a line feed. That is why Ctrl+J in the Find and Replace dialog is the usual way to locate visible line breaks inside cells. It does not mean every character described as a “return” in source data is the same character. If Ctrl+J finds nothing, the cell may contain a carriage return, a different separator, or no embedded break at all.

A line break inside a cell is also different from text wrapping. Wrapping displays long text on multiple screen lines according to the column width; it does not insert a line-break character. Replacing a break changes the cell’s text, while changing column width or turning off Wrap Text only changes how the content is displayed.

Find and replace an in-cell line break

Use these steps in Excel for Microsoft 365 on Windows:

  1. Select the cells to search, or leave the worksheet without a selection to search the current sheet.
  2. Press Ctrl+H to open Find and Replace. You can also use Home > Find & Select > Replace.
  3. Click in Find what and press Ctrl+J. The box may appear empty; the line-feed character is not displayed as an ordinary symbol.
  4. Click Replace with and type what should take the break’s place. Leave it empty to delete the break, or enter a space, comma, or other separator.
  5. Choose Replace to check matches one at a time, or Replace All to change every match in the search scope.

For example, a cell containing “Harbor” followed by an in-cell break and “Street” becomes “Harbor Street” if the replacement is a space. If the replacement box is empty, the result is “HarborStreet.” Choose the replacement with the meaning of the text in mind: deleting a break can accidentally run two words together.

On a Mac, use Excel’s Find and Replace command from the menu or ribbon; the exact shortcut can differ with the keyboard layout and macOS settings. The same distinction between LF and CR applies. In Excel for the web, use the available Find and Replace command in the Home ribbon; browser keyboard shortcuts can take precedence, so the ribbon command is a dependable way to open it.

What Ctrl+J does—and what it does not do

In the Find and Replace dialog, Ctrl+J inserts the line-feed control character into the search field. The character is invisible there, so it can look as though the field is blank. That is expected. Type the replacement in its own box after entering Ctrl+J in Find what.

This method is useful for line breaks in worksheet cells, but it is not a general-purpose way to enter every control character. In particular, Ctrl+J searches for LF; it should not be treated as a guarantee that Excel will find a CR character or both parts of a CR-LF pair. If data came from a text file, database, or another application, its break characters may differ from the ones created by Alt+Enter.

Find and Replace also has search options that affect results. Check the dialog’s options if Excel misses a value: the search may be limited to formulas or values, may be set to search within the sheet or workbook, or may be affected by a selected range. If you selected a range before opening Replace, Excel typically confines the operation to that selection. Review the scope before choosing Replace All, especially in a workbook with multiple sheets.

Replacing a true carriage return with a formula

If Ctrl+J does not locate the character, a formula can explicitly target its code. With the original text in A2 and a line feed between “North” and “West,” this formula replaces LF with a space: =SUBSTITUTE(A2,CHAR(10)," "). The result is North West. Put the formula in another cell, fill it down as needed, and inspect the results before replacing the original data.

With the text in A2 containing a carriage return between “North” and “West,” use =SUBSTITUTE(A2,CHAR(13)," "). The result is also North West. This formula targets CR only. If the source contains a CR-LF pair, replacing just one character can leave the other behind, so clean both when the source format is uncertain.

With a CR-LF pair between “North” and “West” in A2, use =TRIM(SUBSTITUTE(SUBSTITUTE(A2,CHAR(13)," "),CHAR(10)," ")). It replaces each character with a space and trims extra ordinary spaces at the start and end. The result is North West. The nested substitutions matter because the pair consists of two characters, not one.

These formulas return cleaned text in a separate cell; they do not overwrite the source. To make the cleaned result permanent, copy the results and use Paste Special > Values over the original cells after checking them. Keep a backup or work on a copy first. If the original cells contain formulas, replacing them with values removes those formulas.

When CLEAN or TRIM is a better option

CLEAN removes many nonprinting control characters from text, including the common CR and LF characters. With text in A2, =CLEAN(A2) returns the text without those characters. This can be convenient for imported content, but it removes other control characters too, including tabs. If tabs or other formatting characters carry meaning in the data, use targeted SUBSTITUTE formulas instead.

TRIM alone is not a reliable way to remove line breaks: its main job is to remove repeated ordinary spaces and spaces at the beginning or end of text. A useful cleanup pattern is to replace CR and LF with spaces first, then use TRIM, as in the CR-LF example above. Replacing breaks with spaces preserves a boundary between words; deleting them may merge the text.

One caution: TRIM does not remove every kind of whitespace that can appear in imported text. For instance, nonbreaking spaces can require a separate cleanup. If the visible result still looks odd after removing CR and LF, inspect the source for other characters rather than repeatedly applying the same replacement.

Common problems and how to diagnose them

  • The Find what box looks blank. Ctrl+J inserts an invisible LF. That appearance is normal; try Find Next or Replace on a known cell before using Replace All.
  • Nothing is found. The source might contain CR (CHAR(13)) instead of LF (CHAR(10)), or the apparent new line may only be wrapping. Test a targeted formula in a spare column.
  • Words run together. The replacement was probably left empty. Replace the break with a space or punctuation when the two text fragments should remain separate.
  • Extra spaces appear. A CR-LF pair may have been replaced with spaces twice. Use the nested SUBSTITUTE formula followed by TRIM, or choose a replacement strategy suited to the source.
  • Only some cells change. Check whether a range was selected and review the dialog’s search scope and options. Also confirm the affected cells contain actual breaks, not just wrapped text.
  • Results look unchanged. Find and Replace changes cell contents, not the row height or display settings. A remaining visual line break may be due to wrapping or another character.

For troubleshooting, test one known cell in a spare column and compare the formula result with the original. This avoids guessing which invisible character is present. Once the result is correct, apply the chosen method to a controlled range and verify a few cells at the top, middle, and bottom.

Find and Replace versus formulas

Find and Replace is the quickest choice when the unwanted character is the standard in-cell LF and you want to edit the selected cells directly. It also lets you inspect individual matches before changing them. Its limitation is that the line-break shortcut targets a specific character, and the dialog does not show that character clearly.

Formulas are a better fit when you need to distinguish CR from LF, handle a CR-LF pair, preserve the source, or repeat the cleanup on new data. They make the transformation explicit, but require an extra output column and a decision about whether to keep formulas or paste the results as values. For a one-off, known LF cleanup, Ctrl+H is usually simpler; for inconsistent imported text, targeted formulas offer more control.

Frequently Asked Questions

How do I find a line break in an Excel cell?
Press Ctrl+H, click Find what, press Ctrl+J, and search or replace. Ctrl+J enters an invisible line feed in the search field.

How do I replace a carriage return with a space?
If it is the usual LF line break, use Ctrl+H and Ctrl+J, then type a space in Replace with. For a true CR character, use a formula such as =SUBSTITUTE(A2,CHAR(13)," ") with the source text in A2.

Why does Ctrl+J find nothing?
The cells may contain CR rather than LF, or the text may only appear on multiple lines because Wrap Text is enabled. Check the content with a formula that targets CHAR(13) or CHAR(10), and review the Find options and search scope.

Does Excel use CHAR(10) or CHAR(13) for Alt+Enter?
Excel’s standard in-cell line break is LF, represented by CHAR(10). CHAR(13) is a carriage return and can appear in data imported from other sources.

Can I remove line breaks without deleting words?
Yes. Replace each break with a space, either in Find and Replace or with a SUBSTITUTE formula. If the source may contain both CR and LF, replace both with spaces and use TRIM to tidy the result.

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.