[英]Find the last match from two columns
The following question discusses how to find last match in a column: 以下问题讨论如何在列中查找最后一个匹配项:
find last match in column using built in functions in excel vba 使用excel vba中的内置函数查找列中的最后一个匹配项
I need a way to find the last instance on an entry based on two columns. 我需要一种基于两列在条目上查找最后一个实例的方法。
So, find the last 'Item1' from column B and find the last '2 L' from column D. When both match, display the corresponding value from column C. 因此,从B列中找到最后一个“ Item1”,从D列中找到最后一个“ 2 L”。当两者都匹配时,从C列中显示相应的值。
I tried using the AND function with the solution mentioned in the above questions but AND does not work with the arrays generated. 我尝试将AND函数与上述问题中提到的解决方案一起使用,但AND不适用于生成的数组。
Any clues how I could get this done? 有什么线索可以完成这项工作吗? Thank you! 谢谢!
PS: I need to do it without VBA. PS:我需要在没有VBA的情况下进行操作。
Based on the example you give: 根据您提供的示例:
=LOOKUP(1,0/((B2:B6=F3)*(D2:D6=G3)),C2:C6)
Ranges passed to such a construction should be kept to a minimum. 传递给这种构造的范围应保持最小。 Using entire column references, for example, would be a terrible idea. 例如,使用整个列引用将是一个糟糕的主意。
Regards 问候
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.