Get The Workbook

While entering or editing data in Excel it is possible to add line breaks in the cell using Alt + Enter. This can be a convenient way to display data in Excel, but is often not great for any type of data analysis.

 

For example, it might be more convenient for the reader to display an address in a cell like this:

John MacDougall
123 Fake Street
Any Town
Canada

Rather than like this:

John MacDougall, 123 Fake Street, Any Town, Canada

 

In this post I’ll show you how to separate the data in your cells based on the in-cell line breaks. This can be useful when doing any sort of data analysis on the data. In this example, we have address data which includes a person’s name, address, city and country. The data is in one cell for each person but the name, address, city and country are on different lines.

 

Step-001-How-To-Separate-Data-In-A-Cell-Based-On-Line-Breaks How To Separate Data In A Cell Based On Line Breaks

 

Select your data and open the Text to Columns wizard.

  1. Select all the data containing multiple in-cell lines which you want to convert into single line cells.
  2. Go to the Data tab in the ribbon.
  3. Select Text to Columns in the Data Tools section.

 

Step-002-How-To-Separate-Data-In-A-Cell-Based-On-Line-Breaks How To Separate Data In A Cell Based On Line Breaks

 

Text to Columns wizard step 1.

  1. Select Delimited option under Original data type.
  2. Press the Next button.

 

Step-003-How-To-Separate-Data-In-A-Cell-Based-On-Line-Breaks How To Separate Data In A Cell Based On Line Breaks

 

Text to Columns wizard step 2.

  1. Select Other from the Delimiters options and deselect all the rest of the options. In the input box to the right of Other press Ctrl + J to insert a line break as your delimiter.
  2. You should see dividers appear in the Data preview pane where there are line breaks in your data.
  3. Press the Next button.

 

Step-004-How-To-Separate-Data-In-A-Cell-Based-On-Line-Breaks How To Separate Data In A Cell Based On Line Breaks

 

Text to Columns wizard step 3.

  1. Use the range selector icon to choose a destination for the divided data. Select a cell outside of the original data range to keep a copy of the original data.
  2. Check the Data preview to make sure the text to column is correct.
  3. Press the Finish button.

 

Step-005-How-To-Separate-Data-In-A-Cell-Based-On-Line-Breaks How To Separate Data In A Cell Based On Line Breaks

 

Now each line from the original data is in its own column allowing for easier analysis of the different data fields using pivot tables, formulas or other tools!