|
Sub lll()
Dim arr
Dim arr1()
Dim i, k, m, n, h, g As Integer
arr = Range("a1").CurrentRegion
For i = 1 To UBound(arr)
m = 0
n = 0
h = 0
For k = 1 To UBound(arr)
If arr(i, 1) = arr(k, 2) Then
m = m + 1
End If
Next
For k = 1 To UBound(arr)
If arr(i, 1) = arr(k, 3) Then
n = n + 1
End If
Next
For k = 1 To UBound(arr)
If arr(i, 1) = arr(k, 4) Then
h = h + 1
End If
Next
If m >= 1 And n >= 1 And h >= 1 Then
g = g + 1
ReDim Preserve arr1(1 To g)
arr1(g) = arr(i, 1)
End If
Next
Range("f1").Resize(UBound(arr1), 1) = Application.WorksheetFunction.Transpose(arr1)
End Sub |
评分
-
1
查看全部评分
-
|