.....HansV wrote:C'mon Sal, you can do this!
Dim DIC2 As Object
Set DIC2 = CreateObject("Scripting.Dictionary")
...
If DIC.Exists(CHIAVE) Then
DIC(CHIAVE) = DIC(CHIAVE) + CONTANTI
DIC2(CHIAVE) = DIC2(CHIAVE) + 1
Else
DIC.Add CHIAVE, CONTANTI
DIC2.Add CHIAVE, 1
End If
...
If this piece of code is good, how to change the loop in fore ecah? perpahs:
For Each varEntry In DIC
Debug.Print varEntry & "-" & DIC(varEntry) & "-" & DIC2(varEntry)
Next varEntry