Quick Tip: Find and Replace Line Breaks in Cells

Quick Tip: Find and Replace Line Breaks in Cells

To show text on separate lines in an Excel worksheet cell, use a shortcut, Alt+Enter, to add a line break. If you want to remove them later, use Ctrl+J in Find and Replace. This short video shows the steps.

Video: Add and Remove Line Breaks

In her latest video, Sarah shows how to add a line break in a worksheet cell. She also shows how to remove line breaks in Excel, with the Find and Replace feature.

There are written steps below the video.

Video Timeline

  • 00:00 Introduction
  • 00:06 Create a Line Break
  • 00:17 Wrap Text
  • 00:23 Remove Line Breaks
  • 00:33 Find and Replace
  • 00:44 Find What
  • 01:01 Replace With
  • 01:14 Find Next
  • 01:27 Line Break Shortcuts
  • 01:34 Get the Workbook

Add Line Breaks in a Cell in Excel

To show text on separate lines within a single cell, add a line break.

linebreakaltenter03
Add Line Breaks in a Cell in Excel

Here are the steps to add a line break in a cell:

  • Select the cell
  • In the Formula Bar, click where you want the line break
  • Press Alt + Enter, to add the line break
  • Press Enter, to complete the change

Remove Line Breaks in a Cell

Later, if you want to replace all the line breaks with a space character, use a special shortcut — Ctrl + J — in the Find and Replace dialog box.

Note: A line break (line feed) is character 10 in the ASCII characters, and the Ctrl + J shortcut is the original ASCII control code for character 10.

To replace a line break with a space character:

  • Select the cells that you want to search
  • On the keyboard, press Ctrl + H to open the Find and Replace dialog box, with the Replace tab active
  • On the Replace tab, click in the Find What box
  • On the keyboard, press Ctrl + J to enter the line break character
    • NOTE: Nothing will appear in the Find What box
  • Press the Tab key on the keyboard, to move to the Replace With box
  • Type a space character

Then, do these steps to find or replace the line breaks

  • Click Find Next or Find All, to find the cells with line breaks.
    • OR
  • Click Replace or Replace All, to replace the line breaks with space characters.

Get the Sample File

To get the Excel workbook, with the Add or Remove Line Breaks in a Cell in Excel example, go to the Excel Line Breaks page on my Contextures site.

_________________

Quick Tip: Find and Replace Line Breaks in Cells

Quick Tip: Find and Replace Line Breaks in Cells

Quick Tip: Find and Replace Line Breaks in Cells

_________________

5 thoughts on “Quick Tip: Find and Replace Line Breaks in Cells”

  1. Hello. I saw a colleague effectively use the method described above in Excel to use Find & Replace to find line breaks (Ctrl+J) and replace with a space. I added line breaks (Alt+Enter). I’m following your steps step-by-step to replace the line breaks I created, but am told Excel couldn’t find anything to replace. I am working in Excel 2016. Any ideas what the issue might be?

  2. You may ignore my recent message to you. I determined the issue. The Find What field had not been completely cleared out, since the Ctrl+J entry is not apparent. I likely entered Ctrl+J twice. Thanks though.

  3. For Excel online… Control-J have been taken over by Chrome and Edge to open the download page. Any way to still use replace and code in instructions?

  4. HOw do we remove the ctrl-j carachter once we are done ….. I tried backspace and it does not work

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.