hi, i have data ids in sheet1 in column a i want to lookup the ids in column a in sheet2 from a to e. what can i use apart from vlookup in vba i would appreciate your help please.
column a column g column a column e
123 ? 123 rr
234 ? 234 tt
567 ? 567 uu
i have the code which i got from internet but could not figure out how to plug in if you could assist please. I have posted the same question in mr excel.com too.
Sub test() Dim a, i As Long a = Sheets("sheet2").Range("a1").CurrentRegion.Resize(, 2).Value With CreateObject("Scripting.Dictionary") For i = 2 To UBound(a, 1) .Item(a(i, 1)) = a(i, 2) Next a = Sheets("sheet1").Range("a1").CurrentRegion.Resize(, 3).Value a(1, 3) = "Supplier Name" For i = 2 To UBound(a, 1) If .exists(a(i, 2)) Then a(i, 3) = .Item(a(i, 2)) Next End With Sheets("sheet1").Range("a1").CurrentRegion.Resize(, 3).Value = a End Sub