Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Inserting several new rows
I have a spreadsheet with about 1500 rows. I want to insert 18 black rows
after each existing row. Is there a quick way of doing this without having to do this after each row? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Inserting several new rows
That will give you 27,000 rows - are you sure this is what you want to
do? And I presume you meant 18 blank rows rather than black rows? Pete On Jan 17, 11:00*pm, richzip wrote: I have a spreadsheet with about 1500 rows. *I want to insert 18 black rows after each existing row. *Is there a quick way of doing this without having to do this after each row? |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Inserting several new rows
Sub Insert_Some_Rows()
Application.ScreenUpdating = False Dim numRows As Integer Dim R As Long numRows = InputBox("Enter number of blank rows to insert") R = Cells(Rows.Count, "A").End(xlUp).Row For R = R To 1 Step -1 ActiveSheet.Rows(R + 1).Resize(numRows).Insert Next R Application.ScreenUpdating = True End Sub If you're not familiar with VBA and macros, see David McRitchie's site for more on "getting started". http://www.mvps.org/dmcritchie/excel/getstarted.htm or Ron de De Bruin's site on where to store macros. http://www.rondebruin.nl/code.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 or edit 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 Thu, 17 Jan 2008 15:00:02 -0800, richzip wrote: I have a spreadsheet with about 1500 rows. I want to insert 18 black rows after each existing row. Is there a quick way of doing this without having to do this after each row? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
inserting rows | Excel Discussion (Misc queries) | |||
Inserting Blank rows after every row upto 2500 rows | Excel Worksheet Functions | |||
Inserting new rows | Excel Worksheet Functions | |||
inserting rows at top | New Users to Excel | |||
Inserting rows | Excel Discussion (Misc queries) |