简体   繁体   English

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

[英]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.

相关问题 如何从两个单元格中的参考值返回第三列的查找值? - How can I return a lookup value from a third column from a reference value in two cells? 来自与新列匹配的另一列的查找值 - lookup value from another column that matches with new column 如果第二列匹配,如何在Excel中查找2列并返回值 - How to Lookup for 2 columns in Excel and Return Value if second column Matches 如果在其他2列中满足条件,如何在excel中使用查找从第三列返回值 - How do i use a lookup in excel to return a value from a third column, if criteria are met in 2 other columns 如果在其中一列中找到查找值,则返回第一列的值 - Return value of the first column if lookup value is found in one of columns 如果值在Column中匹配,则返回行 - If value matches in Column then return the row 将一栏中的值与另一栏中的键值一起旋转 - Pivot the values in one column with a key value in another 将一列中的每个值匹配到另一列,并将第三列中的值插入 excel - Match each value from one column to another column and insert value from third column in excel 比较来自不同工作表的两列,并在第三列返回数值 - Compare two column from different sheet and return numeric value on third 从键上的一个选项卡中提取列值,然后使用公式将其分配给其他选项卡值 - Extract a column value from one tab from on the key and assign it in to other tab value using a formula
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM