every 3 row insert a blank row

mabalo76

New Member
Joined
Apr 10, 2018
Messages
27
I have a spreadsheet with some data, i want to insert a blank row on every 3 row

For example i have original data below
1
2
3
4
5
6
7
8
9


I want data like blow
1
2
3

4
5
6

7
8
9
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
This will do that, including the very top row, which you can always delete after it's done.

Code:
Sub test()
Dim i As Long
Dim LR As Long

LR = Range("[B][COLOR=#ff0000]A[/COLOR][/B]" & Rows.Count).End(xlUp).Row

For i = LR To 1 Step -1
    If i Mod 3 = 1 Then
        Range("[COLOR=#ff0000][B]A[/B][/COLOR]" & i).EntireRow.Insert
    End If
Next i

End Sub

Change "A" to whatever column you're interested in.

BTW, please test this on a copy of your workbook, not the original. Just in case it does something you don't like.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,246
Messages
6,170,996
Members
452,373
Latest member
TimReeks

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top