|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
Sub 保存汇总()
Dim a As Long
Application.ScreenUpdating = False
b = ThisWorkbook.Sheets("快递查询").Cells(Rows.Count, "A").End(xlUp).Row
Sheets("快递查询").Cells(b + 1, "A") = Sheets("销售清单").Cells(2, "F")
Sheets("快递查询").Cells(b + 1, "b") = Sheets("销售清单").Cells(2, "c")
Sheets("快递查询").Cells(b + 1, "d") = Sheets("销售清单").Cells(4, "c")
With ThisWorkbook.Sheets("销售统计单")
a = ThisWorkbook.Sheets("销售统计单").Cells(Rows.Count, "A").End(xlUp).Row
For i = 1 To 20
If ThisWorkbook.Sheets("销售清单").Cells(i + 5, "B") <> "" Then
n = n + 1
.Cells(n + a, "A") = ThisWorkbook.Sheets("销售清单").Cells(2, "F")
.Cells(n + a, "B") = ThisWorkbook.Sheets("销售清单").Cells(2, "C")
.Cells(n + a, "C") = ThisWorkbook.Sheets("销售清单").Cells(3, "C")
.Cells(n + a, "D") = ThisWorkbook.Sheets("销售清单").Cells(i + 5, "B")
.Cells(n + a, "E") = ThisWorkbook.Sheets("销售清单").Cells(i + 5, "C")
.Cells(n + a, "F") = ThisWorkbook.Sheets("销售清单").Cells(i + 5, "D")
.Cells(n + a, "G") = ThisWorkbook.Sheets("销售清单").Cells(i + 5, "E")
End If
Next i
End With
ThisWorkbook.Save
Application.ScreenUpdating = True
MsgBox "保存成功"
End Sub
|
评分
-
1
查看全部评分
-
|