It sounds to me that while each of the macros is working on different rows they're all doing the same thing - finding the 1st, 2nd, 3rd, 4th or 5th blank line and inserting a line before it and copying down the formula from the previous row.
Therefore one main macro can do all of the work and you just need 5 small macros to call the main one with a parameter specifying which block you're talking about, as below:
Sub InsertAndCopy(lBlockNumber As Long)
Dim lBlockCount As Long
Dim rngCurrentRow As Range
Set rngCurrentRow = ActiveSheet.Range("A1")
For lBlockCount = 1 To lBlockNumber
Set rngCurrentRow = rngCurrentRow.End(xlDown).Offset(2, 0)
Next lBlockCount
rngCurrentRow.EntireRow.Insert shift:=xlDown
Set rngCurrentRow = rngCurrentRow.Offset(-2, 0)
While rngCurrentRow.Column <= ActiveSheet.Cells(rngCurrentRow.Offset(-1, 0).Row, ActiveSheet.Columns.Count).End(xlToLeft).Column
rngCurrentRow.Formula = rngCurrentRow.Offset(-1, 0).Formula
Set rngCurrentRow = rngCurrentRow.Offset(0, 1)
Wend
End Sub
Sub TestMacro()
InsertAndCopy 3
End Sub
Because this code doesn't work on fixed rows so long as you always have your rows separated by a single blank row it will work, irrespective of the size of the individual blocks.
Bookmarks