- Sub test()
- Dim i As Worksheet
- For Each i In Sheets
- With i
- If .Name <> "0" Then
- j = j + 1
- .Cells(6, 8) = Cells(2 + j, 2)
- .Cells(7, 8) = Cells(2 + j, 3) + Cells(2 + j, 4)
- .Cells(8, 8) = Cells(2 + j, 5)
- .Cells(6, 5) = Cells(2 + j, 8)
- .Cells(7, 5) = Cells(2 + j, 9) + Cells(2 + j, 10)
- .Cells(8, 5) = Cells(2 + j, 11)
- .Cells(6, 7) = Cells(2 + j, 14)
- .Cells(7, 7) = Cells(2 + j, 15) + Cells(2 + j, 16)
- .Cells(8, 7) = Cells(2 + j, 17)
- .Cells(6, 10) = Cells(2 + j, 20)
- .Cells(7, 10) = Cells(2 + j, 21) + Cells(2 + j, 22)
- .Cells(8, 10) = Cells(2 + j, 23)
- End If
- End With
- Next
- End Sub
复制代码 |