且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

查找与一列中的键匹配的值,然后将其用作键以返回第三列中的值

更新时间:2022-06-14 21:21:57

由于您试图在找到 ColumnN 值的同一行中找到 ColumnL 值,因此我建议使用 INDEX MATCH 组合 - 类似于 VLOOKUP,但功能更强大(例如,可以向左看",而 VLOOKUP 则不能).

Since you are trying to find the ColumnL value in the same row as you find the ColumnN value I’d suggest an INDEX MATCH combination – similar to VLOOKUP but more powerful (eg can ‘look to the left’, which VLOOKUP can’t).

=IFERROR(INDEX(L:L,MATCH(G2,N:N,0)),"") 

MATCH 查找在 ColumnN 中找到 G2 的 位置,以便它是您要返回的 ColumnL 值的行号.

MATCH looks for the position where G2 is found in ColumnN so that is the row number for the ColumnL value you want returned.