|
Sub TEST_A1()
Dim Arr, Brr, xD, i&, j%, k%, T$, D, R&, N&
Set xD = CreateObject("Scripting.Dictionary")
Arr = Range(Sheet1.[a1], Sheet1.[i65536].End(3))
ReDim Brr(1 To UBound(Arr), 1 To 6)
For i = 2 To UBound(Arr)
For j = 4 To 7: T = T & "/" & Arr(i, j): Next
If xD(T) = 0 Then
N = N + 1: xD(T) = N
For k = 1 To 4: Brr(N, k) = Arr(i, k + 3): Next
End If
R = xD(T): D = Val(Arr(i, 2)): T = ""
If D > Brr(R, 5) Then Brr(R, 5) = D: Brr(R, 6) = Arr(i, 9)
Next i
Sheet2.[a2:f2000].ClearContents
Sheet2.[a2].Resize(N, 6) = Brr
End Sub
|
|