Comparing two columns, and returning a specific adjacent cell in Excel

前端 未结 4 1745
孤街浪徒
孤街浪徒 2020-12-03 12:42

I am using a combination of if, vlookup, match, iserror functions, and unfortunately I\'ve not been able to find the righ

4条回答
  •  青春惊慌失措
    2020-12-03 13:17

    Very similar to this question, and I would suggest the same formula in column D, albeit a few changes to the ranges:

    =IFERROR(VLOOKUP(C1, A:B, 2, 0), "")
    

    If you wanted to use match, you'd have to use INDEX as well, like so:

    =IFERROR(INDEX(B:B, MATCH(C1, A:A, 0)), "")
    

    but this is really lengthy to me and you need to know how to properly use two functions (or three, if you don't know how IFERROR works)!

    Note: =IFERROR() can be a substitute of =IF() and =ISERROR() in some cases :)

提交回复
热议问题