In Excel for Microsoft 365 on Windows, use Ctrl+J in the Find what box to search for a return character (line break), or in Replace with to insert one. Open the dialog with Ctrl+H, then enter Ctrl+J while the cursor is in the appropriate box; the character usually appears invisible, but Excel can still find or insert it.
What Excel means by a return character
In a worksheet cell, what people often call a return, carriage return, or new line is usually a line feed character. Excel represents a line feed in a formula as CHAR(10). It separates two lines of text within one cell; it does not start a new worksheet row. For example, a cell might contain “North” followed by a line break and “Warehouse.” Both words remain in the same cell.
Ctrl+J is a practical way to enter this otherwise hard-to-see character into Excel’s Find and Replace boxes. It is not a visible code such as ^p in Microsoft Word, and typing the letters “Ctrl+J” will not work. Press the keys while the insertion point is inside the box. The field may look empty afterward, which is normal.
Line breaks are different from spaces, tabs, and paragraph marks in other applications. A space may look similar in a cell that wraps text, but it does not create a new line. Likewise, pressing Enter normally confirms a cell entry or moves the selection; it does not insert a line break inside the cell.
Find a line break with Ctrl+H
- Select the cells you want to search. If you do not select a range, Excel searches the current worksheet by default.
- Choose Home > Find & Select > Replace, or press Ctrl+H on Windows.
- Click in Find what and press Ctrl+J. The box may remain visually blank.
- Choose Find Next to inspect matches one at a time, or choose Find All to list matches. Use Replace for an individual change or Replace All for every match in the search scope.
On a Mac, open the replacement dialog through Edit > Find > Replace. Keyboard behavior and key labels can vary by Mac keyboard and Excel setup, so if Ctrl+J does not enter a line feed in the field, use a formula-based cleanup or consult Excel’s current shortcut guidance for your setup. Excel for the web has a more limited interface and shortcut behavior; when the dialog does not support the required character entry, open the workbook in the desktop app.
Replace or remove line breaks
To remove line breaks, put Ctrl+J in Find what and leave Replace with empty, then select Replace All. This joins the text on either side directly. If a cell contains “North” and “Warehouse” on separate lines, the result becomes “NorthWarehouse,” which may not be what you intend.
To retain a readable separation, type a space in Replace with instead. The same example becomes “North Warehouse.” You can also enter a comma, semicolon, slash, or other separator if that suits the data. To replace each line break with a new line break, press Ctrl+J in both boxes. This is generally useful only when changing another aspect of the content is also part of the task.
Before using Replace All, consider checking a few results with Find Next. A cell may contain more than one line break, and Replace All changes every matching break in the selected scope. If the replacement is destructive or hard to reverse, save a copy first; the Undo command can reverse many worksheet replacements, but it is safer not to rely on undo as the only backup.
Check the search scope and options
A replacement can affect more cells than expected if the search scope or options are not right. In the Find and Replace dialog, expand Options and review the settings before replacing. In particular, check whether Excel is searching within the current sheet or the workbook, and whether it is looking in values or formulas. The available choices can affect what Excel finds and changes.
- Search a selected range: select the intended cells before opening Replace. This is a useful safeguard when only one column or imported-data block needs cleaning.
- Search a worksheet or workbook: confirm the Within setting. A workbook-wide replacement can alter multiple sheets.
- Look in values or formulas: formula cells can contain line breaks in their formula text, or return line breaks as results. If the displayed text comes from a formula, changing the formula may be necessary rather than replacing its displayed result.
- Use Find Next first: inspect matches before applying Replace All, especially in a workbook with formulas, notes, or mixed data.
Find and Replace is for worksheet cell contents; it is not a general command to remove line breaks from every object in a workbook. Text in shapes, comments, headers, or other features may need to be handled separately. Also, a line break can be present even when it is not obvious: a narrow column, hidden rows, or formatting can make the cell’s content difficult to inspect.
Why the line break may not be visible
Ctrl+J inserts a control character rather than a printable symbol, so an empty-looking Find what box does not prove the search failed. After replacing a line break with a space, the result may also appear unchanged if the cell was already visually wrapped. Widen the column, select the cell, and inspect the formula bar to distinguish a real line break from ordinary text wrapping.
Text wrapping and line breaks are related but not interchangeable. With Home > Wrap Text, Excel can display long text on multiple lines because it reaches the edge of the cell. That visual wrap does not necessarily mean the cell contains a line-feed character. Find and Replace with Ctrl+J targets the actual character, not every point where Excel happens to wrap the display.
Another potential issue is imported text. Data copied from websites, PDFs, or other systems may contain different control characters or inconsistent separators. Excel commonly uses line feed (LF, character 10) for an in-cell new line, but an imported file may need additional cleanup. If Ctrl+J finds nothing, test the data in a formula or inspect a small sample rather than assuming every apparent break is the same character.
Use a formula when you want a repeatable cleanup
A formula can be preferable when you want to preserve the source column, apply the same cleanup to new rows, or make the replacement rule visible. For example, with the original text in A2, enter this in B2 to replace line breaks with spaces:
With the original text in A2, this formula returns the text with each line feed replaced by one space: =SUBSTITUTE(A2,CHAR(10)," ")
For a source cell containing “North” plus a line feed plus “Warehouse,” the result is “North Warehouse.” Fill the formula down for other rows. The original values remain in column A unless you later copy the formula results and use Paste Special > Values to replace them. Keep a copy of the originals if you may need to restore them.
If the goal is to remove line breaks without adding a separator, use the following with the source value in A2. Its result for the same example is “NorthWarehouse”: =SUBSTITUTE(A2,CHAR(10),"")
These examples handle line feeds, not every possible whitespace character. If you need to normalize several types of separators, first identify what the imported data contains and choose a cleanup method accordingly. A formula also recalculates when its source changes; Find and Replace, by contrast, edits the selected cell contents directly.
Insert a return character in a cell
To create a line break while editing a cell on Windows, press Alt+Enter at the point where the next line should begin. For instance, type “North,” press Alt+Enter, and then type “Warehouse.” The cell may need Home > Wrap Text enabled for the separate lines to display clearly. The line break remains part of the cell even though it does not create another row.
You can also generate a line break with a formula. With the first text in A2 and the second text in B2, use this formula in C2 to join them on separate lines: =A2&CHAR(10)&B2. If A2 contains “North” and B2 contains “Warehouse,” the result is one cell with “North” on the first line and “Warehouse” on the second. Apply Wrap Text to C2 if the display does not show both lines.
On Mac, the shortcut for inserting a line break while editing a cell differs from Windows and can depend on the keyboard configuration; use the Excel menu or current Microsoft shortcut instructions for the installed version. The formula approach using CHAR(10) works as an alternative when you need a predictable result across platforms.
Find and Replace compared with other cleanup methods
Choose Find and Replace when you need a quick, one-time edit to existing cell contents and can verify the scope. Choose a formula when you want to keep the original data intact, document the transformation, or repeat it as more rows arrive. Use Alt+Enter when manually composing a small number of cells, rather than trying to paste a special character through the dialog.
For a larger recurring import, Power Query can provide a repeatable transformation workflow, although the exact steps depend on how the source data is structured. It is often more appropriate than manually running Replace All each time an export is refreshed. If only the display looks like it has a break, check column width and Wrap Text before editing the data: changing the content will not fix a purely visual wrap.
One common misconception is that Ctrl+J inserts a new worksheet row. It does not; it represents an in-cell line feed in the Find and Replace boxes. Another is that every multi-line-looking cell contains a return character. Excel can wrap text automatically without storing any line-break character, so verify the contents before replacing anything.
Frequently Asked Questions
What is the Excel shortcut for a return character in Find and Replace?
In Excel for Windows, click in Find what or Replace with and press Ctrl+J. It may look blank because the line-feed character is not displayed as ordinary text.
How do I remove line breaks but keep a space between words?
Open Replace with Ctrl+H, enter Ctrl+J in Find what, type one space in Replace with, and use Replace All after checking the search scope.
Does Ctrl+J remove automatic text wrapping?
No. It searches for a stored line-feed character. Automatic wrapping is a display effect controlled by the cell width and Wrap Text setting, and it may remain after a replacement.
How do I insert a line break inside a cell?
On Windows, edit the cell and press Alt+Enter where the break should go. In a formula, use CHAR(10) between text values and enable Wrap Text if needed.
Why does Replace All find zero matches?
The text may be visually wrapped rather than contain a line feed, or the imported content may use a different character. Check the selected range and search settings, then inspect a sample or try a formula using CHAR(10).
Will Find and Replace change formula results?
It can interact with formula cells depending on the search settings and what is being searched. If a formula generates the line break, changing the formula is usually the reliable way to change its result; preserve a copy before making broad replacements.
Related
- Excel Data Validation Examples and Setup Tips
- Excel Data Validation Drop-Down Not Showing? Fixes
- Excel Data Validation Dynamic List: Setup and Tips
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Excel WEEKDAY: Get the Day of the Week from a DateIn Excel, use WEEKDAY to return a number for the day of the week represented by a date.…
- How to Add Audio to a PowerPoint SlideshowTo add audio in PowerPoint for Microsoft 365 on Windows, open the slide where you want the sound,…
- How to Write Dates in Google SheetsTo write a date in Google Sheets, select a cell, enter a date in a format your spreadsheet’s…
- Excel Power Query: Import Multiple CSV FilesTo import and combine multiple CSV files in Excel for Microsoft 365 on Windows, put the files in…
- Excel Page Break Button Locked? Common Causes and FixesIn Excel for Microsoft 365 on Windows, the Page Break command is usually unavailable because Excel is editing…
- How to Freeze a Header Row in Excel While ScrollingTo keep your column headings visible while you scroll in Excel for Microsoft 365 on Windows, select View…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.