Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub UGvlookup()
- Dim cl As Range, Dic As Object
- Set Dic = CreateObject("Scripting.Dictionary"): Dic.Comparemode = vbTextCompare
- With Sheets("Sheet A")
- For Each cl In .Range("B2:B" & .Cells(Rows.count, "C").End(xlUp).Row)
- If Not Dic.exists(cl.Value) Then Dic.Add cl.Value, cl.Row
- Next cl
- End With
- With Sheets("Sheet B")
- For Each cl In .Range("A2:A" & .Cells(Rows.count, "A").End(xlUp).Row)
- If Dic.exists(cl.Value) Then
- Sheets("Latency").Cells(Dic(cl.Value), 17) = "UG"
- End If
- If Dic.exists(cl.Value) Then
- Sheets("Latency").Cells(Dic(cl.Value), 17) = "UG"
- Dic.Remove (cl.Value)
- End If
- Next cl
- End With
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement