[英]Lookup a value that matches a key in one column then apply that as a key to return a value from a third column
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. 我在G列和N列中的值具有相同的值,但顺序不同,因此,如果G列和N列匹配,则将L列返回到A列。我从A列的L列获取了错误的值。
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
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). 由于您试图在找到ColumnN值的同一行中找到ColumnL值,因此我建议使用INDEX MATCH组合–与VLOOKUP类似,但功能更强大(例如,可以“向左看”,而VLOOKUP则不能) 。
=IFERROR(INDEX(L:L,MATCH(G2,N:N,0)),"")
MATCH looks for the position where G2 is found in ColumnN so that is the row number for the ColumnL value you want returned. MATCH查找在ColumnN中找到G2的位置 ,这是要返回的ColumnL值的行号。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.