Sub ex1()
Arr = Sheet1.Range("A1").CurrentRegion
Set d = CreateObject("Scripting.Dictionary")
For i = 1 To UBound(Arr)
d(Left(Arr(i, 1), 6)) = Arr(i, 2)
Next
Sheet2.[A1:B65536].ClearContents
Sheet2.[A1].Resize(d.Count, 2) = Application.Transpose(Array(d.keys, d.items))
End Sub作者: rouber590324 時間: 2017-9-7 08:36
Sub AA()
Arr = Sheet1.Range("A1").CurrentRegion
Set d = CreateObject("Scripting.Dictionary")
For i = 1 To UBound(Arr)
d(Left(Arr(i, 1), 6)) = Arr(i, 2)
Next
Sheet2.[A1:F65536].ClearContents
Sheet2.[A1].Resize(d.Count, 6) = Application.Transpose(Array(d.keys, d.items))
End Sub作者: ML089 時間: 2017-9-7 16:01