How to Split Multiple Lines in a Cell into a Separate Cells / Columns

In Excel, you can use the Text to Columns functionality to split the content of a cell into multiple cells.

You can specify the delimiter (such as a space, comma, or tab) and the Text to Columns would use this delimiter to split the content of the cells.

Examples of this include splitting first and last names, or username and domain name in email ids.

However, if you have a dataset where the delimiter is a line break (in the same cell), it gets tricky to split these multiple lines in the same cell into separate cells/columns.

For example, you can have a dataset as shown below, where you need to split multiple lines in the address (separated by line breaks) into separate cells.

Split Multiple Lines in a Cell into a Separate Cells or Columns - Data

This would allow you to have the Name, Street, City, and Country in separate cells.

So the result would look something as shown below:

Split Multiple Lines in a Cell into a Separate Cells or Columns - Result needed

Now to separate each part of the address, we can use the Text to Columns functionality (with a twist).

Note: If you’re wondering how I managed to insert each address element into a new line in the same cell, you can do that by using the keyboard shortcut – ALT + Enter (it enters a line break). You can read more about it here.

Using Text to Column to Split Multiple Lines in a Cell

Below are the steps that will split multiple lines in a single cell into separate cells:

  • Select the entire dataset that you want to split.
  • Go to the Data tab.Data Tab in the Ribbon
  • In the Data Tools group, click on the Text to Columns option.Text to Columns option in the ribbon
  • In the Text to Columns dialog box, in Step 1 of 3, select Delimited and click ‘Next’.Step 1 - Select Delimited checkbox
  • In Step 2 of 3, uncheck any existing Delimiters selection, and select the ‘Other’ option. Now Use the keyboard shortcut Control + J (hold the ‘Control’ key and then press the ‘J’ key). You will not see anything in the box except a tiny blinking dot (if you look hard). Also, you will see the expected result in the ‘Data preview’ section (as shown below). Click on Next.Step 2 in Text to Columns - Control + J Keyboard Shortcut
  • In Step 3 of 3, change the ‘Destination’ cell to the one where you want the output. In my example, I want the result in B2, so I changed the value to $B$2.Step 3 - Specify the destination
  • Click on Finish.

The above steps would automatically split the content of the cells based on where the line break occurs in each cell.

Note that if you don’t want to keep the original data (it’s always advisable to do so though), you don’t need to specify the destination cell. It will simply overwrite the existing data and give you the result.

Also, in case you already have data in the cells where you are about to get the result of Text to Columns, Excel will show you a prompt letting you know that you will be overwriting the existing data. You can choose to overwrite or cancel

Excel Text to Columns Prompt - there is already data

How does this work?

When you use the keyboard shortcut Control J, it specifies the line break as the delimiter in the Text to Columns wizard.

Now, Text to Columns checks each cell for line breaks and use it to split the content into separate cells.

Note that Text to Columns would always split the content of the cells in separate columns. If you want to get the result in cells in different rows, you can transpose the result (as shown here).

You May Also Like the Following Excel Tutorials:

DOWNLOAD FREE EXCEL EBOOK

51 Excel Tips to Save Time & Increase Productivity

(22,000+ Enthusiasts have Already Downloaded)

  • Vikas Kumar

    Appreciate this; But whether there is any way to do this by the help of formula.

  • Zaheer Waheed

    HI Summit – I am using excel 2016 and the CTRl+J – did not work.

  • Patty Ball

    always wondered how to do this

  • Greg Jackson

    Hands down the best procedure I’ve found for converting multiple Lines in a cell into separate cells / columns