Sub yy()
Dim i%, nr%
Sheet3.Cells.Clear
K = 1
With Sheet2
sr = IIf(.[a1] = "", .[a1].End(xlDown).Row, 1)
nr = .[a65536].End(xlUp).Row
For i = sr + 2 To nr
Union(.Range("a" & sr & ":f" & sr + 1), .Range("a" & i & ":f" & i)).Copy Sheet3.Cells(K + 1, 1)
Sheet3.Cells(K + 4, 1).Resize(1, 6).Borders(9).LineStyle = xlDashDot
Sheet3.Cells(K, 1).Value = "你好!"
Sheet3.Cells(K + 4, 6).Value = "结束命令"
K = K + 5
Next
End With
End Sub