Hi everyone - I'm looking for some help with managing a dictionary where I have items that have an index number and some items have the same number.
Looking for guidance on how to deal with this.
As it stands - column "A" has my index number and there are further columns of data that I am building into a dictionary array... but I have noticed that some things have multiple entries (or items in the list) with the same index number.
Following this my code is looking at existing range data and updating/comparing items.... but I don't know how I can do this if I have two items with the same number.
Any advice appreciated.
Thanks
Tom
Looking for guidance on how to deal with this.
As it stands - column "A" has my index number and there are further columns of data that I am building into a dictionary array... but I have noticed that some things have multiple entries (or items in the list) with the same index number.
VBA Code:
With CreateObject("scripting.dictionary")
For Each cl In ws4.Range("A2", ws4.Range("A" & Rows.Count).End(xlUp))
If Not .exists(cl.Value) Then .Add cl.Value, Array(cl.Offset(, 1).Value, cl.Offset(, 2).Value, cl.Offset(, 3).Value, cl.Offset(, 4).Value, cl.Offset(, 5).Value, cl.Offset(, 6).Value, cl.Offset(, 7).Value, cl.Offset(, 8).Value, cl.Offset(, 9).Value)
Next cl
Following this my code is looking at existing range data and updating/comparing items.... but I don't know how I can do this if I have two items with the same number.
Any advice appreciated.
Thanks
Tom