Hi - How do I lookup an item on 2 lists with out the ws3 overriding the ws2 inputs? basically changing it so that if it cant find the item from ws1 in ws2, then look in ws3. This is the code I tried to modify to add ws3. thanks!
Code:
[COLOR=#333333]With CreateObject("scripting.dictionary") [/COLOR]
[COLOR=#333333].CompareMode = 1[/COLOR]
[COLOR=#333333]For Each Cl In ws2.Range("E45", ws2.Range("E" & Rows.Count).End(xlUp))[/COLOR]
[COLOR=#333333].Item(Cl.Value) = Cl.Offset(, 2).Value[/COLOR]
[COLOR=#333333]Next Cl[/COLOR]
[COLOR=#333333]For Each Cl In ws1.Range("A11", ws1.Range("A" & Rows.Count).End(xlUp))[/COLOR]
[COLOR=#333333]Cl.Offset(, 1).Value = .Item(Cl.Value)[/COLOR]
[COLOR=#333333]Next Cl[/COLOR]
[COLOR=#333333]For Each Cl In ws3.Range("E45", ws3.Range("E" & Rows.Count).End(xlUp))[/COLOR]
[COLOR=#333333].Item(Cl.Value) = Cl.Offset(, 2).Value[/COLOR]
[COLOR=#333333]Next Cl[/COLOR]
[COLOR=#333333]For Each Cl In ws1.Range("A11", ws1.Range("A" & Rows.Count).End(xlUp))[/COLOR]
[COLOR=#333333]Cl.Offset(, 1).Value = .Item(Cl.Value)[/COLOR]
[COLOR=#333333]Next Cl[/COLOR]
[COLOR=#333333]End With[/COLOR]
Last edited: