Hi, Try this Your Data Must start in (Minium of) row 2, Column "A".
Sub MG11Aug22
Dim Rng As Range, Dn As Range, Q
Set Rng = Range(Range("A2"), Range("A" & Rows.Count).End(xlUp))
With CreateObject("scripting.dictionary")
.CompareMode = vbTextCompare
For Each Dn In Rng
If Not .Exists(Dn.Value) Then
.Add Dn.Value, Array(Dn.Value, 1)
Dn.Next = 1
Else
Q = .Item(Dn.Value)
If Dn.Offset(-1) = Dn.Value Then
Dn.Next = Q(1)
Else: Q(1) = Q(1) + 1
Dn.Next = Q(1)
.Item(Dn.Value) = Q
End If
End If
Next
End With
End Sub
Regards Mick
Bookmarks