|
参与一下。。。- Sub ykcbf() '//2024.3.14
- Dim arr, brr
- Application.ScreenUpdating = False
- Application.DisplayAlerts = False
- st = Array("张三", "李四", "赵五")
- With Sheets("Sheet1")
- arr = .UsedRange
- Set rng = .Rows(UBound(arr) + 1)
- For i = 2 To UBound(arr)
- ft = 0
- For j = 1 To UBound(arr, 2)
- For x = 0 To UBound(st)
- If InStr(arr(i, j), st(x)) Then
- ft = 1
- Exit For
- End If
- Next
- If ft = 1 Then Exit For
- Next
- If ft = 1 Then Set rng = Union(rng, .Rows(i))
- Next
- If Not rng Is Nothing Then rng.EntireRow.Delete
- End With
- Application.ScreenUpdating = True
- MsgBox "OK!"
- End Sub
复制代码
|
评分
-
1
查看全部评分
-
|