Insert blank row after x rows

Barbapapa

New Member
Joined
Sep 26, 2006
Messages
4
Here is my problem:

I have a long list of data (~35000 rows) and I need to divide it to 5 row blocks. SO after every 5 rows I need to insert one empty.


1
2
3
4
5
6
7
8
9
10
11
...

to

1
2
3
4
5

6
7
8
9
10

11
...

Any easy solution available? Can't do it with VBA myself and not enough time to study this time. Need to have this done quickly.

Thanks in advance!
 

Some videos you may like

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).

acw

MrExcel MVP
Joined
Feb 13, 2004
Messages
4,814
Hi

Does your data start in row 1? If not, where does it start?


Tony
 

acw

MrExcel MVP
Joined
Feb 13, 2004
Messages
4,814
Hi

Maybe....

Code:
Sub bbb()
  StartRow = InputBox("What is the data starting row?", , 1)
  i = StartRow + 5
  While Not IsEmpty(Cells(i, 1))
    Cells(i, 1).EntireRow.Insert
    i = i + 6
  Wend
End Sub


Tony
 

Watch MrExcel Video

Forum statistics

Threads
1,112,797
Messages
5,542,558
Members
410,560
Latest member
1ndependent
Top