Forum Discussion

colbyclem's avatar
colbyclem
Copper Contributor
May 17, 2023
Solved

Comparing lists and returning values

Hello,   I am working on a project where I need to compare two data set from different workbooks. I need to compare data point x of set B with the entirety of set A. If a match is found, I need it ...
  • mtarler's avatar
    May 17, 2023

    IF you have Excel 365 you can do the whole set using something like:
    =XLOOKUP( [list of values in B], [range to lookup in A], [range to return from A], "match not found")
    if you don't have Excel 365 then something like =IFERROR(VLOOKUP(setB!A1, setA!$A:$B, 2), "match not found")      and then fill down (unless it is in a table in which case you would use [@value] and it would automatically fill down)
    but if the lookup column is after the return value column then you will need to use INDEX(MATCH()) combination instead of VLOOKUP (or HLOOKUP)

Resources