答案 0 :(得分:1)
尝试一下。
Sub test()
Dim vDB, rngDB As Range
Dim vHead
Dim rngT As Range, i As Long
Set rngDB = Range("a3").CurrentRegion
vHead = Range("a3").Resize(1, 2)
For i = 16 To rngDB.Rows.Count Step 15
vDB = rngDB.Range("a" & i).Resize(15, 2)
Set rngT = Cells(3, Columns.Count).End(xlToLeft).Offset(, 1)
rngT.Resize(1, 2) = vHead
rngT.Offset(1, 0).Resize(15, 2) = vDB
Next i
rngDB.Offset(16).Clear
Set rngDB = Range("a3").CurrentRegion
rngDB.Borders.LineStyle = xlContinuous
End Sub