Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Inserting multiple rows every other row

I ahve a report that has 144 lines of data and I need to insert 11 additional
blank lines in between each line that has data but doing this manually takes
foever. Is there a function or macro that can be used to insert the 11 blank
lines between each line of data?
Thanks,
--
Scottm
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Inserting multiple rows every other row

Scott

Sub InsertRows()
Application.ScreenUpdating = False
Dim numRows As Integer
Dim r As Long
numRows = 11
For r = 144 To 1 Step -1
ActiveSheet.Rows(r + 1).Resize(numRows).EntireRow.Insert
Next r
Application.ScreenUpdating = True
End Sub

If not familiar with VBA and macros, see David McRitchie's site for more on
"getting started".

http://www.mvps.org/dmcritchie/excel/getstarted.htm

In the meantime..........

First...create a backup copy of your original workbook.

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + r to open Project Explorer.

Find your workbook/project and select it.

Right-click and InsertModule. Paste the code in there. Save the
workbook and hit ALT + Q to return to your workbook.

Run the macro by going to ToolMacroMacros.

You can also assign this macro to a button or a shortcut key combo.


Gord Dibben MS Excel MVP

On Wed, 14 Feb 2007 11:44:02 -0800, Scottm
wrote:

I ahve a report that has 144 lines of data and I need to insert 11 additional
blank lines in between each line that has data but doing this manually takes
foever. Is there a function or macro that can be used to insert the 11 blank
lines between each line of data?
Thanks,


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
inserting multiple rows in one shot? Greg Excel Discussion (Misc queries) 3 June 28th 06 07:26 PM
Inserting multiple non-consecutive rows piper1963 Excel Discussion (Misc queries) 3 June 22nd 06 12:02 AM
Inserting Multiple Rows Mike Excel Discussion (Misc queries) 4 February 9th 06 01:21 AM
Inserting multiple rows syssupspe Excel Discussion (Misc queries) 3 January 13th 06 05:06 PM
Inserting Multiple Rows with Formulas ShineboxNJ Excel Worksheet Functions 2 November 18th 04 02:30 AM


All times are GMT +1. The time now is 03:24 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"