PDA

View Full Version : [SOLVED:] blank rows



futun
10-22-2024, 01:43 PM
kindly share a macro code for inserting blank row after every other row

rollis13
10-22-2024, 02:44 PM
Here I'm supposing that column A contains data (change as needed) and that row 1 is a header row. Have a try with:
Option Explicit
Sub InsertEmptyRows()
Dim x As Long
For x = Range("A" & Rows.Count).End(xlUp).Row To 2 Step -1 'If row 1 isn't a header row use To 1 instead.
Range("A" & x + 1).EntireRow.Insert
Next x
End Sub