Excel: Insert multiple rows every other row

The key is to use a macro.  To do so, hit Alt+F11, then create a new macro and add the code below. Once added, select the worksheet you’d like to process, change the “17” below (1 if to process all rows), then run it.

That’s it.

Sub Insert_Blank_Rows()

    Dim Last As Integer, oRow As Integer
    ‘Count and select rows to process
    Last = Range("A" & Rows.Count).End(xlUp).row
   
    ’17 is the last row to process (at the top)
    For oRow = Last To 17 Step -1
     If Not Cells(oRow, 1).Value = "" Then
        ‘Copy the line below to as many row insert you need
        ‘in this case, it was 3 row inserts
        Cells(oRow, 1).EntireRow.Insert
        Cells(oRow, 1).EntireRow.Insert
        Cells(oRow, 1).EntireRow.Insert
       End If
    Next oRow

End Sub
   

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.