In our previous tutorial, we have learned how to insert blank rows in every (alternate) row. But, today, we will get to learn a better and advanced way. if you are familiar with VBA, this method may be very easy for you, if not, that’s fine. just go ahead.
Prepare a sheet and press Alt and F11 to quickly open the VBA box.
![How To Use VBA To Insert Blank Row After Every Row In Excel? How To Use VBA To Insert Blank Row After Every Row In Excel?](https://www.myofficetricks.com/wp-content/uploads/2021/07/image-34.png)
Go to insert and choose Module.
![How To Use VBA To Insert Blank Row After Every Row In Excel? How To Use VBA To Insert Blank Row After Every Row In Excel?](https://www.myofficetricks.com/wp-content/uploads/2021/07/image-35.png)
Now we type this code in it.
Sub InsertRows()
Dim i As Integer
For i = 2 To 19 Step 2
Rows(CInt(i)).Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Next i
End Sub
![How To Use VBA To Insert Blank Row After Every Row In Excel? How To Use VBA To Insert Blank Row After Every Row In Excel?](https://www.myofficetricks.com/wp-content/uploads/2021/07/image-36.png)
Press F5 or click on the green triangle to run it.
![How To Use VBA To Insert Blank Row After Every Row In Excel? How To Use VBA To Insert Blank Row After Every Row In Excel?](https://www.myofficetricks.com/wp-content/uploads/2021/07/image-37.png)
When we back to the table, you will find it has already inserted a row after each row.
![How To Use VBA To Insert Blank Row After Every Row In Excel? How To Use VBA To Insert Blank Row After Every Row In Excel?](https://www.myofficetricks.com/wp-content/uploads/2021/07/image-38.png)
Remember to save this code, you can just copy and paste it when you need it. That’s all for this tutorial. Hope it can really help you a lot.
Leave a Reply