|
Sub qs()
Dim arr, i, rng As Range, dic As Object
Set dic = CreateObject("scripting.dictionary")
With Sheet1
arr = Sheet1.Range("a1").CurrentRegion.Value
ReDim brr(1 To UBound(arr), 1 To UBound(arr, 2))
For i = 3 To UBound(arr)
s = arr(i, 2) & arr(i, 3) & arr(i, 4) & arr(i, 4)
If Not dic.exists(s) Then
dic(s) = ""
Else
m = m + 1
For j = 1 To UBound(arr, 2)
brr(m, j) = arr(i, j)
Next
End If
Next
End With
Sheet2.Range("a3:z10000").ClearContents
Sheet2.Range("a3").Resize(m, UBound(arr, 2)) = brr
Beep
End Sub
|
|