如果格式是完全一樣在您的示例示出並且將不會改變,並且位於表1的單元格A1開始:從比其他任何空片
Sub doFormatData()
Dim shtIn As Worksheet
Dim shtOut As Worksheet
Dim rIn As Long
Dim rOut As Long
Dim c As Long
Set shtIn = Sheets("Sheet1")
Set shtOut = ActiveSheet
rIn = 1
rOut = 1
Do
For c = 1 To 4
shtOut.Cells(rOut, c).Value = shtIn.Cells(rIn, c).Value
Next c
For c = 5 To 6
shtOut.Cells(rOut, c).Value = shtIn.Cells(rIn + 1, c - 4).Value
Next c
For c = 7 To 8
shtOut.Cells(rOut, c).Value = shtIn.Cells(rIn + 2, c - 6).Value
Next c
rIn = rIn + 3
rOut = rOut + 1
Loop Until shtIn.Cells(rIn, 1).Value = ""
End Sub
運行它工作表Sheet1。第一個包含數據的單元格將爲A1。
一個例子可能不足以傳達您的要求,是否有任何佈局變化的規則? – pnuts