I have the below code, that uses \"UG list\" as the source and does vlookup on two different sheets - Latency and TT.
If the result is found it passes the string \"UG\"
Two things:
You are using the same dictionary Dic
for different sheets. Before using it for next sheet, clear the dictionary, so that you dont have any old values.
dic.RemoveAll
With Sheets("TT")
.........
To prevent the second updates, just remove the item from dictionary, as soon as as you find it first time. Though I am not sure what duplicate value you are referring to, as in dictionary you can't have duplicates.
If dic.exists(cl.Value) Then
Sheets("Latency").Cells(dic(cl.Value), 17) = "UG"
dic.Remove (cl.Value)
End If
If you are just talking about the scenario where if the Column Q already has got "UG" in it and you want to skip that cell then just check it before hand.
If dic.exists(cl.Value) Then
If Sheets("Latency").Cells(dic(cl.Value), 17) <> "UG" Then
Sheets("Latency").Cells(dic(cl.Value), 17) = "UG"
End If
End If