|
因为有些线号找不到所以出错,修改如下。
- Sub bbb()
- Dim i&, r&, c&, rng As Range
- Application.ScreenUpdating = False
- Sheets(2).Select
- [j5:bk12] = ""
- With Sheets(1)
- For i = 4 To .[b65536].End(3).Row
- Set rng = Columns(2).Find(.Cells(i, 4))
- If Not rng Is Nothing Then
- r = rng.Row + IIf(.Cells(i, 5) = "wanban", 1, 0)
- c = Rows(4).Find(.Cells(i, 13)).Column
- Cells(r, c) = Cells(r, c) + .Cells(i, 9)
- End If
- Next i
- End With
- For j = 10 To 63
- If Application.CountA(Cells(5, j).Resize(11)) = 0 Then Columns(j).Hidden = True
- Next
- Application.ScreenUpdating = True
- End Sub
复制代码 |
评分
-
查看全部评分
|