Need a Macro plz !
Option Explicit
Sub InsertBlankRows()
Application.ScreenUpdating = False
Dim numRows As Integer
Dim r As Long
Dim Rng As Range
Dim lastrw As Long
Dim Ar as Range
numRows = InputBox("How many Rows")
lastrw = Cells(Rows.Count, "A").End(xlUp).Row
Set Rng = Range(Cells(1, "A"), Cells(lastrw, "A"))
For r = Rng.Rows.Count To 1 Step -1
Rng.Rows(r + 1).Resize(numRows).EntireRow.Insert
Next r
set rng = columns(1).SpecialCells(xlblanks)
for each ar in rng.Areas
' now ar should hold a reference to a set of 9 blank cells in column A
' you can use that to do your fill. It will then loop to the next set
of
' 9 blank cells
Next ar
Application.ScreenUpdating = True
End Sub
Not much more I can tell you. Just saying serialize doesn't explain what
you are trying to do.
--
Regards,
Tom Ogilvy
wrote in message
oups.com...
sorry i can't get your point ...
here is the macro i use ,,,, plz clarify
Option Explicit
Sub InsertBlankRows()
Application.ScreenUpdating = False
Dim numRows As Integer
Dim r As Long
Dim Rng As Range
Dim lastrw As Long
numRows = InputBox("How many Rows")
lastrw = Cells(Rows.Count, "A").End(xlUp).Row
Set Rng = Range(Cells(1, "A"), Cells(lastrw, "A"))
For r = Rng.Rows.Count To 1 Step -1
Rng.Rows(r + 1).Resize(numRows).EntireRow.Insert
Next r
Application.ScreenUpdating = True
End Sub
thanks for your help
|