|
- Sub test2()
- Dim r%, i%, j%, k%
- Dim arr
- Dim rng As Range
- With Worksheets("f30180669")
- r = .Cells(.Rows.Count, 1).End(xlUp).Row
- arr = .Range("a1:f" & r)
- ReDim brr(1 To UBound(arr), 1 To 1)
- For i = 3 To UBound(arr) - 1
- If brr(i, 1) <> 1 Then
- For j = i + 1 To UBound(arr)
- If brr(j, 1) <> 1 Then
- If arr(i, 1) + arr(j, 1) = 0 Then
- For k = 2 To UBound(arr, 2)
- If arr(i, k) + arr(j, k) <> 0 Then
- Exit For
- End If
- Next
- If k > UBound(arr, 2) Then
- brr(i, 1) = 1
- brr(j, 1) = 1
- Exit For
- End If
- End If
- End If
- Next
- End If
- Next
- Set rng = .Rows(r + 1)
- For i = 1 To UBound(brr)
- If brr(i, 1) = 1 Then
- Set rng = Union(rng, .Rows(i))
- End If
- Next
- rng.Select
- 'rng.Delete
- End With
- End Sub
复制代码 |
评分
-
1
查看全部评分
-
|