简体   繁体   English

VLookUp 的替代方案,可以检查两个因素是否为真

[英]Alternative to VLookUp that can check if two factors are true

I am wondering is there any alternative to VLookUP() that can check two factors before returning a value.我想知道是否有任何替代 VLookUP() 的方法可以在返回值之前检查两个因素。 I want to search for an identifier that is only unique for a given date.我想搜索仅对给定日期唯一的标识符。

IE the Key exists multiple times in the dataset but only once for each date so the date and the key combined form a primary key. IE key 在数据集中存在多次,但每个日期只存在一次,因此日期和键组合形成主键。

Note: I want to do this without adding a column to the dataset.注意:我想在不向数据集中添加列的情况下执行此操作。

在此处输入图像描述

This is a simplified example.这是一个简化的例子。 I want a formula that will return 304 if I look up using 02/03/20 and 89076.如果我使用 02/03/20 和 89076 查找,我想要一个返回 304 的公式。

My current solution is to make another column that concatenates column A and column B and then do a Vlookup on the column but I am looking for a solution that does not require adding another column.我目前的解决方案是制作另一列连接列 A 和列 B,然后对列进行 Vlookup,但我正在寻找不需要添加另一列的解决方案。

Using Excel 2010使用 Excel 2010

In Excel 2010, if you not looking for a figure but actual text, try the following:在 Excel 2010 中,如果您不是在寻找图形而是实际文本,请尝试以下操作:

=INDEX(D:D,MATCH(1,INDEX((A:A=DATEVALUE("02/03/20"))*(B:B=89076),),0))

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM