LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default How do i insert blank rows between data that is thousands of r

Sub InsertRows()
Application.ScreenUpdating = False
Dim numRows As Integer
Dim r As Long
Dim X As Long
numRows = 2 'adjust for rows to insert
X = Cells(Rows.Count, 1).End(xlUp).Row 'last row in column A
For r = X To 1 Step -1
ActiveSheet.Rows(r + 1).Resize(numRows).EntireRow.Insert
Next r
Application.ScreenUpdating = True
End Sub


Gord Dibben MS Excel MVP

On Mon, 14 Apr 2008 11:51:00 -0700, CJ wrote:

what would the formula be if I wanted to insert 2 blank rows after each
existing data row?

"HKaplan" wrote:

Edit this simple macro:

Sub RowInsert()

For X = 2 To 12000
Rows(X).Select
Selection.Insert Shift:=xlDown
X = X + 1
Next X

End Sub




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy rows of data (eliminating blank rows) from fixed layout Sweepea Excel Discussion (Misc queries) 1 March 13th 07 11:05 PM
How do I insert blank rows between rows in completed worksheet? bblue1978 Excel Discussion (Misc queries) 1 October 26th 06 07:02 PM
How do I insert alternating blank rows in a list of data? curiouscat Excel Worksheet Functions 5 September 18th 06 11:09 PM
How do I create a Macro to sort data and insert blank rows & subto karinmpfa Excel Worksheet Functions 2 April 25th 06 09:57 PM
Insert blank rows repeatedly between every data row in Excel Cool Excel Discussion (Misc queries) 2 January 9th 06 12:10 PM


All times are GMT +1. The time now is 06:11 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"