How to insert multiple rows in excel between data automatically
Tutor 5 (32 Reviews)
Excel Tutor
Still stuck with a Excel question
Ask this expertAnswer
Inserting multiple rows between data manually in Excel can be time-consuming, especially for large datasets. Excel provides methods to automate this process using formulas, helper columns, or VBA macros.
Method 1: Using a Helper Column and Sorting
-
Insert a new column next to your dataset. Name it "Helper."
-
Assign a sequential number to each row of your existing data. For example, in column A, rows 1–10 contain data. In column B, enter numbers 1–10.
-
Multiply these numbers by a factor to create spaces for the new rows. Example:
-
If you want one empty row between each existing row, multiply each number by 2.
-
The formula in B1:
=ROW()*2-1
Drag this down to all rows.
-
-
Copy the helper column values.
-
Insert blank rows by sorting based on the helper column. Highlight the entire dataset and helper column, then sort by the helper column in ascending order. Empty numbers create blank rows.
This method allows adding multiple empty rows proportionally without manually inserting them.
Method 2: Using VBA Macro to Insert Multiple Rows
VBA is the fastest way to insert rows automatically between data, especially for large datasets.
-
Press
Alt + F11to open the VBA editor. -
Go to Insert → Module.
-
Paste the following code:
Sub InsertMultipleRows()
Dim i As Long
Dim numRows As Long
Dim lastRow As Long
'Set number of rows to insert between each data row
numRows = 2 'Change this number as needed
'Find the last row with data in column A
lastRow = Cells(Rows.Count, 1).End(xlUp).Row
'Loop from the last row to the first
For i = lastRow To 2 Step -1
Rows(i).Resize(numRows).Insert Shift:=xlDown
Next i
End Sub
-
Change
numRows = 2to the number of blank rows you want to insert. -
Press
F5to run the macro.
This macro will insert the specified number of blank rows between each row in your dataset automatically.
Note: Mac users use Option + F11 to access the VBA editor. The macro works the same way.
Method 3: Using Power Query
-
Select your dataset and go to Data → Get & Transform → From Table/Range.
-
In Power Query, add an Index Column starting from 1.
-
Duplicate the table. In the duplicate, increase the index by 0.5 to create spacing.
-
Append the tables together.
-
Sort by the index column to place original and blank rows alternately.
-
Load back to Excel.
This method is suitable for dynamic datasets that refresh regularly.
These methods efficiently insert multiple rows between data automatically without manual effort. VBA is preferred for large datasets, while helper columns are simpler for small tables.
. Was this Helpful?Get Online Tutoring or Questions answered by Experts.
You can post a question for a tutor or set up a tutoring session
Answers · 1
Excel chart axis labels not showing
Answers · 1
Excel chart title not showing
Answers · 1
Excel chart labels not showing
Answers · 1
Excel chart not showing data
Answers · 1