Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
CJ CJ is offline
external usenet poster
 
Posts: 102
Default Insert Multiple Blank Rows

How do I insert 2 blank rows after each line of data? I have a very large
spreadsheet that I need to format and upload into an accounting application.
The format requires that two blank rows follow each line.

I used the below macro but, it only inserts one row rather then two.

Sub RowInsert()

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

End Sub

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 82
Default Insert Multiple Blank Rows

CJ,

Try the following modified code:

Sub RowInsert()

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

End Sub

Hope that helps,

TK

"CJ" wrote:

How do I insert 2 blank rows after each line of data? I have a very large
spreadsheet that I need to format and upload into an accounting application.
The format requires that two blank rows follow each line.

I used the below macro but, it only inserts one row rather then two.

Sub RowInsert()

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

End Sub

  #3   Report Post  
Posted to microsoft.public.excel.misc
CJ CJ is offline
external usenet poster
 
Posts: 102
Default Insert Multiple Blank Rows

Thank you so much, TK. It worked perfectly.

"T Kirtley" wrote:

CJ,

Try the following modified code:

Sub RowInsert()

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

End Sub

Hope that helps,

TK

"CJ" wrote:

How do I insert 2 blank rows after each line of data? I have a very large
spreadsheet that I need to format and upload into an accounting application.
The format requires that two blank rows follow each line.

I used the below macro but, it only inserts one row rather then two.

Sub RowInsert()

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

End Sub

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Insert Multiple Blank Rows

See a reply at your other post.

Not necessary to use a fixed number of rows...12000.......and those "selects"
just slow down your code.


Gord Dibben MS Excel MVP

On Mon, 14 Apr 2008 12:43:00 -0700, CJ wrote:

Thank you so much, TK. It worked perfectly.

"T Kirtley" wrote:

CJ,

Try the following modified code:

Sub RowInsert()

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

End Sub

Hope that helps,

TK

"CJ" wrote:

How do I insert 2 blank rows after each line of data? I have a very large
spreadsheet that I need to format and upload into an accounting application.
The format requires that two blank rows follow each line.

I used the below macro but, it only inserts one row rather then two.

Sub RowInsert()

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

End Sub


Reply
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
How do i insert blank rows between data that is thousands of rows paul.eatwell Excel Discussion (Misc queries) 5 April 14th 08 10:49 PM
insert blank rows sillyscorpio Excel Discussion (Misc queries) 2 December 7th 07 04:23 PM
How can I insert a blank row after every four rows in Excel? EmmaSB Excel Discussion (Misc queries) 2 April 20th 07 10:10 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 to quickly insert a blank row every 5 rows? Med Excel Discussion (Misc queries) 2 September 10th 05 12:32 AM


All times are GMT +1. The time now is 05:51 PM.

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

About Us

"It's about Microsoft Excel"