|
- Sub 按钮1_Click()
- Application.ScreenUpdating = False
- Sheets("2018年订单明细表-USD").Select
- For Each sh In Sheets
- With sh
- If .Name <> "2018年订单明细表-USD" Then
- If Columns(2).Find(Split(.[g8], "订单号:")(1), lookat:=xlWhole) Is Nothing Then
- r = Cells(Rows.Count, 1).End(3).Row + 1
- For j = 13 To .Cells(Rows.Count, 1).End(3).Row
- If .Cells(j, 1) = "合计" Then
- x = j
- Exit For
- End If
- Next j
- Cells(r, 1).Resize(x - 13).Value = Split(.[g9], "订单日期:")(1)
- Cells(r, 2).Resize(x - 13).Value = Split(.[g8], "订单号:")(1)
- Cells(r, 3).Resize(x - 13).Value = .Cells(13, 2).Resize(x - 13).Value
- End If
- End If
- End With
- Next sh
- Application.ScreenUpdating = True
- End Sub
复制代码 |
|