Replace Line Breaks with Commas in Excel Cells
Question details
Replace embedded line breaks in selected Excel cells with a comma and space.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- The user wants multi-line addresses or text values to display on a single line.
- Observed behavior
- Cells contain line breaks that separate text across multiple lines.
Select only the cells or worksheet range where the line breaks should be changed. Make sure you are replacing manual line breaks inside cells, not separate worksheet rows.
Use Find and Replace to change Excel line breaks to commas
Use this method when cells contain manual line breaks and you want to convert every break in the selected range to a comma followed by a space.
The line-break character is not visible in the Find what box. Pressing Ctrl+J enters it, allowing Excel to locate embedded line breaks in cell content.
Highlight the cells containing multi-line text, or click a single cell to apply the replacement across the active worksheet.
Press Ctrl+H to open the Find and Replace dialog box in Excel.
Click the Find what box and press Ctrl+J. The field may appear empty, but Excel has entered the embedded line-break character.
Click the Replace with box and type a comma followed by a space: ,
Click Replace All to change each embedded line break in the selected cells to a comma and space.

Replace Line Breaks with Commas in WPS Spreadsheet
WPS Spreadsheet lets you convert multi-line cell text into comma-separated text with its Find and Replace tool. Select the relevant cells, search for the embedded line-break character, and replace it with a comma and space.
- 1. Open the worksheet in WPS Spreadsheet: Open the Excel workbook in WPS Office and select the cells containing embedded line breaks.
- 2. Open Replace: Press Ctrl+H, or choose Home > Find and Replace > Replace.
- 3. Find the line break: Click Find what and press Ctrl+J to enter the line-break character.
- 4. Enter a comma and space: In Replace with, type a comma followed by a space.
- 5. Apply the replacement: Click Replace All to convert the line breaks in the selected cells.

Frequently Asked Questions
Why does the Find what box look blank after I press Ctrl+J?
Ctrl+J inserts a nonprinting line-break character, so nothing visible appears in the box. Excel can still use it to find embedded line breaks.
Can I replace line breaks in only a few Excel cells?
Yes. Select the target cells before pressing Ctrl+H, then use Replace All. Excel applies the replacement within the selected range.
What should I type in Replace with to put each value on a new comma-separated line?
Type a comma followed by a space in the Replace with box. For example, a three-line address becomes text separated by commas and spaces.
How do I open Find and Replace in Excel for Mac?
If Ctrl+H is not supported in your Excel version, open the Excel menu bar and choose Edit > Find > Replace, then enter the line-break character in Find what.
Will replacing line breaks with commas change separate rows in my worksheet?
No. Find and Replace changes line breaks stored inside a cell. It does not merge or alter separate worksheet rows.




