ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Inserting rows automatically. (https://www.excelbanter.com/excel-worksheet-functions/194064-inserting-rows-automatically.html)

Ms. Oliver

Inserting rows automatically.
 
I have a worksheet that has over 300 entries in almost every row (no skips).

I need to insert 3 empty rows in b/w each filled row. Is there anyway to do
so?

Ex: row 1
row 2
row 3

I want:

row 1


row 2


row 3

I have 3 spreadsheets to change, one is done and it took FOREVER due to
having to manually enter 3 rows in b/w every filled row (that one had almost
400).

I have Excel 2003.

Help!

Work Email:

Don Guillett

Inserting rows automatically.
 
A tad quicker.

Sub insert3rows()
For i = Cells(Rows.Count, "a").End(xlUp).row To 2 Step -1
Rows(i).Resize(3).Insert
Next i
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Ms. Oliver" <Ms.
wrote in message
...
I have a worksheet that has over 300 entries in almost every row (no
skips).

I need to insert 3 empty rows in b/w each filled row. Is there anyway to
do
so?

Ex: row 1
row 2
row 3

I want:

row 1


row 2


row 3

I have 3 spreadsheets to change, one is done and it took FOREVER due to
having to manually enter 3 rows in b/w every filled row (that one had
almost
400).

I have Excel 2003.

Help!

Work Email:



Lars-Åke Aspelin[_2_]

Inserting rows automatically.
 
On Tue, 8 Jul 2008 08:14:06 -0700, Ms. Oliver <Ms.
wrote:

I have a worksheet that has over 300 entries in almost every row (no skips).

I need to insert 3 empty rows in b/w each filled row. Is there anyway to do
so?

Ex: row 1
row 2
row 3

I want:

row 1


row 2


row 3

I have 3 spreadsheets to change, one is done and it took FOREVER due to
having to manually enter 3 rows in b/w every filled row (that one had almost
400).

I have Excel 2003.

Help!

Work Email:




Try this macro:

Sub insert_3_blank_rows()
Range("A65536").End(xlUp).Select
Do While Selection.Row 1
Selection.EntireRow.Select
Selection.Insert Shift:=xlDown
Selection.Insert Shift:=xlDown
Selection.Insert Shift:=xlDown
Selection.Offset(-1, 0).Select
Loop
End Sub


Hope this helps / Lars-Åke




All times are GMT +1. The time now is 01:49 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com