|
参与一下。。。- Sub ykcbf() '//2024.3.12
- Application.ScreenUpdating = False
- Application.DisplayAlerts = False
- Dim tm: tm = Timer
- On Error Resume Next
- For Each sht In Sheets
- If InStr(sht.Name, "目录") = 0 Then
- With sht
- r = .Columns(1).Find("合计").Row
- c = .UsedRange.Columns.Count
- arr = .[a1].Resize(r, c)
- Set Rng = .Rows(UBound(arr) + 1)
- For i = 3 To UBound(arr)
- If arr(i, 3) = Empty And arr(i, 4) = Empty Then
- If arr(i, 5) = Empty And arr(i, 6) = Empty Then
- Set Rng = Union(Rng, .Rows(i))
- End If
- End If
- Next i
- If Not Rng Is Nothing Then Rng.EntireRow.Delete
- .Range("A3").Select
- End With
- End If
- Next
- Application.ScreenUpdating = True
- Application.DisplayAlerts = True
- MsgBox "共用时:" & Format(Timer - tm) & "秒!"
- End Sub
复制代码
|
评分
-
1
查看全部评分
-
|