How to Split a Cell into Two Rows in Excel (3 Easy Ways)

Here’s an overview of splitting a cell into two rows in Excel.

The Overview Image of How to Split a Cell into Two rows in Excel

We’ll use dataset with two columns: Author and Book Name. There are some cells where multiple book names are in one cell (C5, C7, C10). We will split the names of books in cells C5, C7, and C10 into two rows (C5:C6, C7:C8, and C10: C11 respectively). Let’s explore the methods one by one to accomplish our goal.

Dataset of How to Split a Cell into Two Rows in Excel


Method 1 – Using the Text to Columns Feature to Split a Cell into Two Rows in Excel

Steps:

  • Select the cell that you want to split. We selected cell C5.
  • Open the Data tab.
  • From Data Tools, select the Text to Columns option.

Selecting Text to Columns Command from Data tab

  • A dialog box named Convert Text to Columns Wizard will pop up.
  • Select the file type Delimited and click Next.

Clicking Delimited in text to Columns Wizard

  • In step 2, select the Delimiters by which your text will be separated. In our case, the names are separated by a comma (,), so we selected a comma (,).
  • Click Next.

Choosing Delimeter in Text to Columns Wizard

  • In step 3, if you want to place the separated texts in a different location, you can choose a Destination. Otherwise, keep the field as it is.
  • Click Finish.

Clicking Finish in Convert Text to Column Wizard

  • You will see that the values are split into two columns (C5 and D5).

Splitted Cell into two columns

  • To convert the split columns into rows, we can take two different approaches.

Read More: How to Split One Cell into Two in Excel


Option 1.1 – Using the Cut-Paste Option

Steps:

  • Select cell D5.
  • Press Ctrl + X.
  • Go to cell D6.
  • Press Ctrl + V.

Cut & pasting D5 to C6

  • Repeat the entire process for cells C7 and C10 and obtain the desired result.

Result after cut and pasting all the cells

Read More: How to Split a Single Cell in Half in Excel


Option 1.2 – Using the TRANSPOSE Function

Steps:

  • Select the cell to place your value. We selected cell C6.
  • Use the following formula in the selected cell or into the Formula Bar.
=TRANSPOSE(D5)
  • Click Enter.

Using Transpose Function to copy data from another cell

  • Apply the same formula in cells C7 and C10.

Results after splitting cell into two rows


Method 2 – Using Excel VBA to Split a Cell into Two Rows

Steps:

  • Open the Developer tab.
  • Select Visual Basic.

Opening the VBA application window from Developer tab

  • This will open a new window for Microsoft Visual Basic for Applications.
  • Click on Insert and choose Module to open a new module.

Inserting New Module from VBA Editor

  • A new Module will open.

New Empty Module in VBA Editor

  • Insert the following code in the Module.
Sub Split_Cell_into_Rows()
Dim rng As Range
Dim InputRng As Range, OutputRng As Range
ExcelTitleId = "Split Cell into Rows"
Set InputRng = Application.Selection.Range("A1")
Set InputRng = Application.InputBox("Select the cell to be split(single cell) :", ExcelTitleId, InputRng.Address, Type:=8)
Set OutputRng = Application.InputBox("Select the range of rows (a range):", ExcelTitleId, Type:=8)
Arr = VBA.Split(InputRng.Range("A1").Value, ",")
OutputRng.Resize(UBound(Arr) - LBound(Arr) + 1).Value = Application.Transpose(Arr)
End Sub

VBA Code

  • Save the code and go back to the worksheet.
  • Select the cell that you want to split into rows. We selected cell C5.
  • Open the Macro dialog box with Alt + F8.
  • Select the Macro to Run.

Opening VBA Macro Dialogue Box to Run Macro

  • A dialog box will pop up named Split Cell into Rows. Select the cell first or range.

Choosing the cell to be split

  • Select the range where you want to place the split values of a cell. We selected the range C5:C6.

Choosing the range where the cell will be split into.

  • You will see the selected cell’s value is split into two rows.

Result after splitting cell into two rows.

  • We can follow the same process to split cells C7 and C10 into two rows C7:C8, and C10: C11

Final result of splitting cell into two rows using vba code

Read More: How to Split Cell by Delimiter Using Excel Formula


Method 3 – Using Power Query to Split a Cell into Two Rows in Excel

We removed the rows with blank cells, so we need to add them back when splitting.

Dataset for using Power Query to split cells into two rows

Steps:

  • Select the entire dataset.
  • Open the Data tab.
  • Select the From Table/Range option from the ribbon.

Selecting data source From Table/Range

  • A dialog box will pop up. Select My table has headers.
  • Click OK.

Selecting the Data source

  • The Power Query Editor window will pop up.

The Power Query Window

  • Select any cell that you want to split into two rows.
  • Go to the Home tab.
  • Click on Split Column and select By Delimiter.

Splitting Column using delimeter.

  • A dialog box will pop up. Select the Delimiter comma(,), then click on the Advanced Options.
  • Select Rows.
  • Click OK.

Choosing Delimiter and split into Rows from the Split Column by delimiter window.

  • You will see that all the cells that contain a delimiter(comma) have been split into multiple rows. The adjacent cells in the left column were also duplicated.

Results After splitting cells into two rows

  • Click the Close & Load option from the ribbon to load the data in another sheet in the workbook.

Clicking on Close and Load to option.

  • The table will be loaded into a separate sheet.
  • After some formatting, the final result will be like this below.

Final result after using Power Query to Split cells into two rows.

Read More: Excel Formula to Split String by Comma


Download the Practice Workbook

Get FREE Advanced Excel Exercises with Solutions!
Shamima Sultana
Shamima Sultana

Shamima Sultana, BSc, Computer Science and Engineering, East West University, Bangladesh, has been working with the ExcelDemy project for 2 years. She has written over 75+ articles and reviewed 1000+ articles for ExcelDemy. She has also led several teams with Excel VBA and Content Development works. Currently, she is working as the Project Manager and oversees the day-to-day work, leads the services team, allocates resources to the right area, etc. Her work and learning interests vary from Microsoft... Read Full Bio

2 Comments
  1. Not helpful.
    The following steps have nothing to do with the picture at the beginning of the article.

    • Hello, Xzavier!

      For better understanding, we updated the article. Kindly check it now it would be helpful.

      Regards
      ExcelDemy

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo