|
Sub 材料入库单数据转入材料明细表()
x = 2
Do While Not (IsEmpty(Sheets("材料明细表").Cells(x, 1).Value))
x = x + 1
Loop
Z = 6
Do While Not (IsEmpty(Sheets(ActiveSheet.Name).Cells(Z, 2).Value))
Z = Z + 1
Loop
For y = 6 To Z - 1
Sheets("材料明细表").Cells(x, 1) = Sheets(ActiveSheet.Name).Cells(3, 3)
Sheets("材料明细表").Cells(x, 2) = Sheets(ActiveSheet.Name).Cells(3, 6)
Sheets("材料明细表").Cells(x, 3) = Sheets(ActiveSheet.Name).Cells(3, 9)
Sheets("材料明细表").Cells(x, 4) = Sheets(ActiveSheet.Name).Cells(4, 3)
Sheets("材料明细表").Cells(x, 5) = Sheets(ActiveSheet.Name).Cells(4, 6)
Sheets("材料明细表").Cells(x, 6) = Sheets(ActiveSheet.Name).Cells(4, 9)
Sheets("材料明细表").Cells(x, 7) = Sheets(ActiveSheet.Name).Cells(y, 2)
Sheets("材料明细表").Cells(x, 8) = Sheets(ActiveSheet.Name).Cells(y, 3)
Sheets("材料明细表").Cells(x, 9) = Sheets(ActiveSheet.Name).Cells(y, 4)
Sheets("材料明细表").Cells(x, 10) = Sheets(ActiveSheet.Name).Cells(y, 5)
Sheets("材料明细表").Cells(x, 11) = Sheets(ActiveSheet.Name).Cells(y, 6)
Sheets("材料明细表").Cells(x, 12) = Sheets(ActiveSheet.Name).Cells(y, 7)
Sheets("材料明细表").Cells(x, 13) = Sheets(ActiveSheet.Name).Cells(y, 8)
Sheets("材料明细表").Cells(x, 14) = Sheets(ActiveSheet.Name).Cells(y, 9)
x = x + 1
Next y
End Sub
|
|