|
Sub test1()
Dim Source As Worksheet
Dim Destination As Worksheet
Dim lastRow As Long
'1)设置
Set Source = Sheets(1) '指定源工作表
Set Destination = Sheets(2) '指定目标工作表
lastRow = Destination.Cells(Rows.Count, "A").End(3).Row + 1 '获取目标工作表的最后一行行号
'2)赋值
Destination.Cells(lastRow, "A").Value = Source.[J3].Value
Destination.Cells(lastRow, "B").Value = Source.[B3].Value
Destination.Cells(lastRow, "C").Value = Source.[B4].Value
Destination.Cells(lastRow, "D").Value = Source.[B5].Value
Destination.Cells(lastRow, "E").Value = Source.[J4].Value
'... 如果还有,自行追加
Destination.Select
End Sub
新送货单(草稿)2.rar
(24.49 KB, 下载次数: 135)
|
|