Remove Line Breaks Before Splitting Text into Columns in Excel
Question details
Replace embedded line breaks with delimiters before splitting cell contents into columns.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A worksheet contains multiline text that needs to be separated into individual columns, potentially as part of a large or recurring report.
- Observed behavior
- The desired result is a set of columns created from text that was originally separated by embedded line breaks.
Check whether the source cells contain line feeds, carriage returns, or both, and choose a delimiter that does not already occur in the text. Make sure there are empty columns to the right of the split range.
Replace Line Breaks with a Formula and Split the Results
Use a formula when you want to prepare a separate copy of the text before splitting it.
In an empty cell next to the first source cell, enter =SUBSTITUTE(A1,CHAR(10),",") to replace line feeds with commas. Replace A1 with the address of your source cell.
If the text contains carriage returns as well as line feeds, use =SUBSTITUTE(SUBSTITUTE(A1,CHAR(13),""),CHAR(10),",") instead.
Drag the formula's fill handle down the rows you need. Copy the results and use Paste Special > Values in an empty range.
Select the pasted values, choose Data > Text to Columns, select Delimited, and choose Comma. Preview the result and click Finish.

Replace Line Feeds with Find and Replace
Use Find and Replace for a quick, in-place change to a selected range in Excel for Windows.
Clean and Split Recurring Data with Power Query
Use Power Query for large or recurring reports when you want a repeatable transformation.
Replace Line Breaks and Split Text in WPS Spreadsheets
Use a SUBSTITUTE formula in WPS Spreadsheets to replace embedded line feeds, then use Text to Columns to separate the cleaned text.
- 1. Open the worksheet: Open WPS Spreadsheets and use Menu > Open to select your Excel workbook.
- 2. Replace the line breaks: In an empty cell, enter =SUBSTITUTE(SUBSTITUTE(A1,CHAR(13),""),CHAR(10),",") and adjust A1 to match the source cell.
- 3. Prepare the results: Fill the formula down as needed, then copy the results and use Paste Special > Values in an empty range.
- 4. Split into columns: Select the pasted values, choose Data > Text to Columns, select a comma delimiter, and finish the wizard.

Frequently Asked Questions
What does CHAR(10) represent in an Excel formula?
CHAR(10) represents a line-feed character. Use =SUBSTITUTE(A1,CHAR(10),",") to replace line feeds in A1 with commas.
What if my text contains both carriage returns and line feeds?
Use =SUBSTITUTE(SUBSTITUTE(A1,CHAR(13),""),CHAR(10),",") to remove carriage returns and replace line feeds with commas.
Can I split directly on a line break without replacing it first?
In Excel for Windows, select the cells, choose Data > Text to Columns > Delimited, select Other, and press Ctrl+J in its delimiter box. Check the preview before clicking Finish.
When should I use Power Query instead of a formula?
Power Query is useful for large or recurring reports because you can define the cleaning and splitting steps once. Open the range with Data > From Table/Range, then use Data > Refresh All when the source changes.




