Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
The posted macro requires you to pre-select the range of cells.
Revised to run to end of data in Column A. Sub EnterEightRows() Dim rng As Range Set rng = Range(Range("A1"), Cells(Rows.Count, 1).End(xlUp)) x = 0 For Each cell In rng x = x + 1 If (x + 7) Mod 38 = 0 Then cell.Resize(8, 1).EntireRow.Insert Next cell End Sub Gord Dibben MS Excel MVP On Tue, 22 Dec 2009 07:58:04 -0800, Deb wrote: Thank you, Erin. This works fantastically. I can't thank you enough. It will save me so much time when before I was doing this step manually. Just curious, will this macro work for whatever length of data that I may have, just run continuous until there is no more data to manipulate? "Erin Searfoss" wrote: This will work too. Select the cells in the first column of the range where you want to insert the rows. Sub EnterEightRows() x = 0 For Each cell In Selection.Cells x = x + 1 If (x + 7) Mod 38 = 0 Then cell.Resize(8, 1).EntireRow.Insert Next cell End Sub "Deb" wrote: To be exact, I want to be able to insert 8 blank rows after Row 30, Row 68, Row 106, Row 144, Row 182, and Row 220. Is there a macro to set up for that? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Inserting blank rows for missing data in order to transpose | Excel Worksheet Functions | |||
Inserting Lines or Copying lines with formulas but without data | Excel Discussion (Misc queries) | |||
Search numerous spreadsheets for specific data. | Excel Worksheet Functions | |||
How do I remove numerous blank rows from Excel spreadsheet? | Excel Discussion (Misc queries) | |||
inserting specific # of rows | Excel Discussion (Misc queries) |