Hello

Ingolf

Banned
Joined
Mar 20, 2011
Messages
809
Please help me with a minor problem for you.
I have in sheet1 200 rows with lots of questions and I need to insert (1 to 8) blank rows between every row.

Ex.

AAAAAA
BBBBBBB
CCCCCC
DDDDDD and I want something like :


AAAAAA

BBBBBBB

CCCCCC

DDDDDD

Thank you
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Open your VB Editor (Alt+F11) and copy - paste the following. (assuming your data begins at A1)

Sub insertline()
Dim i As Integer
Dim lrow As Integer


lrow = Range("a1").End(xlDown).Row

For i = lrow To 1 Step -1
Range("a" & i).EntireRow.Insert
Next i

End Sub


and then Run the procedure

George

Please help me with a minor problem for you.
I have in sheet1 200 rows with lots of questions and I need to insert (1 to 8) blank rows between every row.

Ex.

AAAAAA
BBBBBBB
CCCCCC
DDDDDD and I want something like :


AAAAAA

BBBBBBB

CCCCCC

DDDDDD

Thank you
 
Upvote 0
You' re welcome

Also, use this version. It's better as you will avoid the screen flashing while the procedure runs:

Sub insertline()
Dim i As Integer
Dim lrow As Integer

Application.ScreenUpdating = False

lrow = Range("a1").End(xlDown).Row

For i = lrow To 1 Step -1
Range("a" & i).EntireRow.Insert
Next i

Application.ScreenUpdating = True

End Sub



Thank you very much George.
 
Upvote 0

Forum statistics

Threads
1,224,598
Messages
6,179,820
Members
452,946
Latest member
JoseDavid

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