Maybe you could use a dictionary instead of an array.
If the string doesn't exists add it to the dictionary else add 1.
Here's a quick example :
Sub test()
Dim ar
Dim Dic, a, b
Dim i As Long
Set Dic = CreateObject("Scripting.dictionary")
ar = Cells(1).CurrentRegion.Value
For i = 1 To UBound(ar, 1)
If Not Dic.exists(ar(i, 1)) Then
Dic.Add ar(i, 1), 1
Else
Dic(ar(i, 1)) = Dic(ar(i, 1)) + 1
End If
a = Dic.keys
b = Dic.items
Next i
With Cells(1, 3)
.Resize(Dic.Count, 1) = Application.Transpose(a)
.Offset(0, 1).Resize(Dic.Count, 1) = Application.Transpose(b)
End With
End Sub
Bookmarks