Hello Everybody,
The challenge is that i have an excel with Data Range from A1:AH40000 and i want to insert 2 blank rows after every 200 rows and in first blank row i want the Auto sum of column "N" just to start i am using the following coding to insert rows which works perfectly but i am stuck on how to do the autosum part:
Sub InsertRows()
Dim i As Long, nRows As Integer, nEvery As Integer
Application.ScreenUpdating = False
nRows = 2 'number of rows to insert
nEvery = 200 'number of rows to skip between insertions
i = nEvery + 1 'first row for insertion
While Not IsEmpty(Cells(i, 1)) 'stop inserting when come to empty cell
Rows(i & ":" & i + nRows - 1).Insert
i = i + nRows + nEvery
Wend
End Sub
Please assist..
Bookmarks