I'm trying to learn how dictionaries works, I know they are similar to collections but I can't quite understand some things, now this is my test work:
i have some values like this
then i put all in a dictionary with a module beacuse i want to compare a value in the column to the other one
Sub dict()
Dim diz As New Dictionary
Dim ora As classe
Dim rg As Range
Set rg = Foglio4.Range("b2:b700")
For i = 2 To 700
Set ora = New classe
ora.old = rg.Cells(i, 1).Value
ora.turn = rg.Cells(i, 2).Value
diz.Add ora, i
Next i
If diz.Exists("4072") = True Then
MsgBox "esiste"
End If
End Sub
in diz i have all values like, diz item (1) "4072","1602"
but there are duplicates that i want to remove
just i can't figure out how
i tried to use the function Exists but it give me back always false
the goal is this
i search a number in a dictionary and i have back the value in the other column
i hope u can help me to better undestand dictionary
thank you in advance

Exists), (3) if not, then add to dict, otherwise do what ever action you need to do.