查找与一列中的键匹配的值,然后将其用作键以返回第三列中的值 [英] Lookup a value that matches a key in one column then apply that as a key to return a value from a third column

查看:25
本文介绍了查找与一列中的键匹配的值,然后将其用作键以返回第三列中的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 G 和 N 列中的值具有相同的值,但顺序不同,因此如果 G 和 N 列匹配,则将 L 列返回到 A 列.我从 L 列中得到错误的值A列.

I have values in columns G and N that have the same values, but not in the same order, so if column G and N matches, then return column L to column A. I am getting the wrong values from column L in column A.

除了下面的公式还需要什么信息?

What other information is needed besides formula below?

=IFERROR(VLOOKUP(N2,$G$2:$N$413,6,FALSE),"")  

Col a      Col b    Col G    Col L   Col M    Col N
    ID     CoID     Items    ItemsID ParentID Items1
    45     1        Apple    45      1        Apple

推荐答案

由于您试图在找到 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.

这篇关于查找与一列中的键匹配的值,然后将其用作键以返回第三列中的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆