Sub demo()
Set D = CreateObject("Scripting.Dictionary")
a = Sheet1.UsedRange
For I = 2 To UBound(a): D(a(I, 1)) = D(a(I, 1)) + 1: Next
For I = 0 To D.Count - 1
D(D.keys()(I)) = Array(I + 1, D.keys()(I), D.items()(I))
Next
Sheet2.UsedRange.Offset(1).ClearContents
[a2].Resize(D.Count, 3) = Application.Rept(D.items, 1)
End Sub
Sub demo()
Set D = CreateObject("Scripting.Dictionary")
a = Sheet1.UsedRange
For I = 2 To UBound(a): D(a(I, 1)) = D(a(I, 1)) + 1: Next
For I = 0 To D.Count - 1
D(D.keys()(I)) = Array(I + 1, D.keys()(I), D.items()(I))
Next
Sheet2.UsedRange.Offset(1).ClearContents
[a2].Resize(D.Count, 3) = Application.Rept(D.items, 1)
End Sub