|
Sub 按钮44_Click()
arr = [a1].CurrentRegion
brr = [a1].CurrentRegion
Sub 按钮44_Click()
arr = [a1].CurrentRegion
brr = [a1].CurrentRegion
Set d = CreateObject("scripting.dictionary")
For j = 2 To UBound(arr)
If Not d.exists(arr(j, 2)) Then
Set d(arr(j, 2)) = CreateObject("scripting.dictionary")
End If
d(arr(j, 2))(arr(j, 3)) = d(arr(j, 2))(arr(j, 3)) & "," & j
Next j
r = 1
For j = 1 To d.Count
m = WorksheetFunction.Large(d.keys, j)
For i = 1 To d(m).Count
n = WorksheetFunction.Small(d(m).keys, i)
crr = Split(d(m)(n), ",")
r = r + 1
For x = 1 To UBound(crr)
For y = 1 To UBound(arr, 2)
brr(r, y) = arr(Val(crr(x)), y)
Next y
Next x
Next i
Next j
[w1].Resize(UBound(arr), UBound(arr, 2)) = brr
End Sub
|
评分
-
1
查看全部评分
-
|