To find a line break in Excel for Microsoft 365 on Windows, press Ctrl+H, click the Find what box, and press Ctrl+J; the line break is invisible in the box. Enter a space or other replacement in Replace with, then choose Replace or Replace All. To insert a line break, put the text to find in Find what and press Ctrl+J in Replace with.
What Ctrl+J finds in Excel
Excel stores a line break inside a cell as a line-feed character, whose character code is 10. Ctrl+J enters that character into the Find and Replace field. Because it is a control character, you generally will not see a symbol or visible text appear after pressing the shortcut. The field may look empty; that does not mean the character was not entered.
This is different from finding a cell that has been made tall, or text that merely looks like it wraps onto a second line. A line break is an actual character within the cell’s text. Automatic wrapping, by contrast, is a display effect: Excel moves text to another visible line when it reaches the cell boundary, but does not insert a line-break character. Ctrl+J finds the former, not the latter.
In Excel for Windows, an in-cell line break is commonly added while editing a cell by pressing Alt+Enter. On Mac, the corresponding shortcut is Control+Option+Return. Pasted data from other programs can also include line breaks, so a cell may contain them even if nobody deliberately inserted one in Excel.
Replace a line break with a space or remove it
Use a space when two pieces of text should remain separate after the break is removed. For example, changing a cell that displays North on one line and South on the next to North South preserves a readable word boundary. Replacing the break with nothing instead joins the text as NorthSouth, which may be useful for codes but is often undesirable for names or sentences.
- Select the cells you want to change. If nothing is selected, Excel searches the current worksheet.
- Press Ctrl+H, or open Home > Find & Select > Replace.
- Click Find what and press Ctrl+J. Leave the box visually blank if you are searching only for the line break.
- Click Replace with and enter a space, a comma, a semicolon, or nothing, depending on the desired result.
- Use Find Next to inspect a match, Replace to change one occurrence, or Replace All to change every match in the search scope.
For example, if a cell contains the two lines West and Wing, replacing the break with a space produces West Wing. Replacing it with a comma and a space produces West, Wing. If you are unsure how many cells will change, use Find Next or Find All first and review the matches before choosing Replace All.
Insert a line break with Find and Replace
Find and Replace can also add a break between text fragments. In Find what, type the separator or phrase you want to split at; in Replace with, press Ctrl+J. For example, searching for a comma followed by a space and replacing it with Ctrl+J puts the text after each comma on a new line inside its cell. This changes the cell contents, not the worksheet layout into separate rows.
After inserting breaks, select the affected cells and turn on Home > Wrap Text if the new lines are not visible. Excel may also need a suitable row height. Use Home > Format > AutoFit Row Height if the row does not expand to show all the lines. A cell can contain a line break even when the display makes it difficult to notice.
Be cautious when splitting at a common character. Replacing every comma may break addresses, lists, or numbers in ways you did not intend. If only some commas should become line breaks, narrow the selection or find a more specific phrase and inspect the affected cells before applying the change broadly.
Choose the right search scope and options
The Replace dialog has settings that affect what Excel searches. Check the Within setting to confirm whether the search applies to the sheet or workbook. A selected range limits the search to that range; without a selection, Excel ordinarily searches the active worksheet. If you intend to change a single column or table, selecting that range first reduces the chance of changing unrelated cells.
Look in determines what Excel searches, such as formulas or values. For ordinary text stored in cells, the usual setting is Values. If results seem unexpected, check this setting and the other search options. Match case and Match entire cell contents can also limit matches. A search for a line break normally should not need those restrictions, but a setting left over from an earlier search can affect what is found.
On Mac, use Excel’s Edit > Find > Replace menu if the Windows shortcut or dialog layout differs; shortcut behavior can depend on the keyboard and macOS configuration. Excel for the web has a different interface from the Windows desktop app, and keyboard handling for an invisible control character may differ. If Ctrl+J does not enter a usable search character in the web app, open the workbook in the desktop app to carry out this method.
Use a formula when you want a separate cleaned result
Find and Replace edits the original cell contents. A formula is a better choice when you want to preserve the source column, clean a copy, or apply the same transformation to a changing list. Excel’s CHAR function can represent the line-feed character as CHAR(10), and SUBSTITUTE can replace it with a chosen string.
With the original text in A2, and a line break between West and Wing, enter this formula in B2 to replace each line break with a space: =SUBSTITUTE(A2,CHAR(10)," "). The result is West Wing. Fill the formula down to process more rows; copy the results and use Paste Special > Values if you need fixed text rather than formulas.
With the same layout, use this formula in B2 to remove the break without inserting a character: =SUBSTITUTE(A2,CHAR(10),""). The result is WestWing. That joined result is a useful reminder to choose a replacement deliberately: deleting a separator can change meaning or make the text harder to read.
Some imported text may contain a carriage return as well as a line feed. With the imported text in A2, this formula removes carriage returns and changes line feeds to spaces: =SUBSTITUTE(SUBSTITUTE(A2,CHAR(13),""),CHAR(10)," "). If the formula leaves a break behind, the source may use a different character or contain another kind of whitespace. Inspect a sample and test the cleanup on a copy before applying it to important data.
Common problems and practical checks
- The Find what box looks empty: Ctrl+J inserts a nonprinting character, so an empty-looking field is expected. Try Find Next on a cell you know contains an in-cell break.
- Excel reports no matches: Check that the correct sheet or range is selected and review the Within and Look in settings. The displayed second line may be automatic wrapping rather than a stored break.
- Some breaks remain: The data may contain carriage returns, line feeds, or a mixture. A formula using CHAR(13) and CHAR(10) can address those two common characters separately.
- The replacement appears to do nothing: Replacing a break with another invisible break may leave the display looking unchanged. Use a visible test replacement, such as a space or a marker, on a copy to verify the match.
- Text is still on multiple display lines: It may wrap because the column is narrow or Wrap Text is enabled. Widen the column or adjust wrapping to distinguish display wrapping from an actual embedded break.
Before using Replace All on a large workbook, save a copy or confirm that the change can be undone. Ctrl+Z normally undoes a recent Find and Replace operation in desktop Excel, but keeping a backup is safer when the edit affects many cells or when later steps may make the original difficult to restore.
Find and Replace versus formulas
Use Find and Replace for a one-time correction when you are confident about the target cells and want to edit them directly. It is quick for normalizing a pasted list, removing unwanted breaks from selected descriptions, or inserting breaks at a consistent separator. Its main risk is scope: Replace All can alter every matching cell in the selected range, sheet, or workbook.
Use a formula when the original data should remain intact, the transformation needs to be repeatable, or new rows will arrive later. Formulas make the cleanup rule visible and can be filled down, but they create a second output column and may require copying and pasting values for a final static result. Neither approach is universally better; choose based on whether you value direct editing or a traceable, repeatable result.
Frequently Asked Questions
What is the shortcut to find a new line in Excel?
On Windows, press Ctrl+H to open Replace, click Find what, then press Ctrl+J. The control character will usually be invisible in the field. On Mac, use Edit > Find > Replace if the shortcut differs on your setup.
How do I replace a line break with a space in Excel?
In Find what, press Ctrl+J. In Replace with, type one space, then choose Replace All to change all matches in the current search scope. Select the intended cells first if you do not want to search the whole worksheet.
How do I remove a line break without leaving a space?
Use Ctrl+J in Find what and leave Replace with empty, then replace the matches. If the text must remain readable, consider a space or punctuation instead of joining the fragments.
How do I put a line break into a cell with Find and Replace?
Enter the text or separator to find, click Replace with, and press Ctrl+J. Enable Wrap Text if needed to display the inserted break. In-cell editing also supports Alt+Enter on Windows.
Why does Ctrl+J find nothing?
Often the cell is only wrapping automatically, rather than containing an embedded line break. Also check the selected range, the search scope, and whether the imported character is a carriage return or another separator instead of a line feed.
Related
- Excel Automatic Goal Seek: Options for Repeated Models
- Excel Auto Merge Cells With the Same Value? Here’s How
- Excel Add Values to a Dropdown List: Easy Methods
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- How to Add a Shared Mailbox Folder in Outlook 365To add a shared mailbox folder in Outlook, first get permission to the mailbox or folder, then add…
- Mail Merge in Word: Practical Questions and AnswersTo run a mail merge in Microsoft Word for Microsoft 365 on Windows, open the Mailings tab, choose…
- How to Freeze a Group of Cells in Excel with Freeze PanesTo keep a group of rows and columns visible while you scroll in Excel, select the cell immediately…
- Excel Shortcuts List: Essential Keys for Faster WorkFor Excel for Microsoft 365 on Windows, the most useful shortcuts include Ctrl+C and Ctrl+V to copy and…
- Google Sheets: How to Ignore Errors SafelyTo make Google Sheets show a chosen value instead of a formula error, wrap the calculation in IFERROR;…
- Schedule a Daily Email in Outlook: The Best MethodTo send the same email automatically every day, create a scheduled cloud flow in Microsoft Power Automate and…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.