Pierre
Sub Insert3Rows_into_927ver2()
Application.ScreenUpdating = False
Sheets("927VER2").Select
Dim numRows As Integer
Dim r As Long
r = Cells(Rows.Count, "A").End(xlUp).Row
numRows = 3
For r = r To 2 Step -1
ActiveSheet.Rows(r + 1).Resize(numRows).Insert
Next r
Application.ScreenUpdating = True
End Sub
ReDim vArr(1 To 3, 1 To 1)
vArr(1, 1) = "Larry"
vArr(2, 1) = "Moe"
vArr(3, 1) = "Curly"
r = Cells(Rows.Count, "A").End(xlUp).Row - 1
numRows = 3
For r = r To 2 Step -1
ActiveSheet.Rows(r + 1).Resize(numRows).Insert
Set rRows = Range(Rows(r + 1), Rows(r + 3)).Columns
rRows.Columns(2).Value = vArr()
Next r
Application.ScreenUpdating = True
End Sub
--
Jim Cone
Portland, Oregon USA
xlCompanion Excel add-in: http://tinyurl.com/XLCompanion
.
.
.
"Pierre" <cow...@aol.com>
wrote in message
Pierre
"Pierre" <cow...@aol.com> wrote in message news:5e3392ee-d490-4e32...@u26g2000yqu.googlegroups.com...
One little thing. .
It misses loading the very last "Parent" record, and doesn't populate
the rows following it with the group of 3, just on that one. Can you
revisit, and tell me what to modify?
Many thanks again.
Pierre
On Jul 29, 10:53 pm, "Jim Cone" <james.cone...@comcast.netXXX> wrote:
> You are welcome.
> '--
> Jim Cone
>
> "Pierre" <cow...@aol.com> wrote in messagenews:5e3392ee-d490-4e32...@u26g2000yqu.googlegroups.com...
> > xlCompanion Excel add-in:http://tinyurl.com/XLCompanion- Hide quoted text -
>
> - Show quoted text -
"Pierre" <cow...@aol.com>
wrote in message
news:f7212a18-efff-463b...@i28g2000yqa.googlegroups.com...
Jim,
Pierre
On Jul 30, 9:31 am, "Jim Cone" <james.cone...@comcast.netXXX> wrote:
> Remove the "- 1" at the end of...
> r = Cells(Rows.Count, "A").End(xlUp).Row - 1
>
> "Pierre" <cow...@aol.com>
> wrote in messagenews:f7212a18-efff-463b...@i28g2000yqa.googlegroups.com...