Patrick,
A few things, which are addressed in my article
http://www.experts-exchange.com/Software/Office_Productivity/Office_Suites/MS_Office/A_3391-Using-the-Dictionary-Class-in-VBA.html1) Unlike a Collection, you cannot refer to items in a dictionary using an index. Rather, in a dictionary, you can only fetch a single item if you supply its key. So, your loop:
For i = 1 To dic.Count
.Cells(i, "C") = dic.Item(i)
Next i
will not pull out items from the dictionary. Indeed, because of the dictionary's "implicit add" behavior, that loop is actually adding new items to the dictionary :)
2) You were actually adding the range as the key, and not the value of the cell, in your first loop:
For Each celle In rng
If Not dic.exists(celle) Then
dic.Add celle, celle
End If
Next celle
Since each cell is a different object, you actually ended up adding all of those cells as both item and key
******************
So, to fix the code:
1) Explicitly pass the values of the cells, and not the cells themselves, to the dictionary. Or, use an array transfer to create an array in memory, and then loop through the array and pass array values to the dictionary
2) Dump the items into an array
3) Do an array transfer to write the values to the worksheet
Patrick