Sub ts()Dim arr, brr Dim i As Long, m As Long Dim dic As Object Set dic = CreateObject("scripting.dictionary") arr = Range("a1:a" & Cells(Rows.Count, 1).End(xlUp).Row) For i = 1 To UBound(arr) If Not dic.exists(arr(i, 1)) Then dic.Add arr(i, 1), "" Else dic.Item(arr(i, 1)) = dic.Item(arr(i, 1)) + 1 End If Next i [c1].Resize(dic.Count) = Application.Transpose(dic.keys) [d1].Resize(dic.Count) = Application.Transpose(dic.items) Set dic = Nothing End Sub
I was in the implementation of CODE, this one CODE, dic.Item(arr(i, 1)) = dic.Item(arr(i, 1)) + 1
can not be implemented, I would like to ask for help?