使用具有两个条件的 INDEX 和 MATCH 进行查找 [英] Lookup using INDEX and MATCH with two criteria
问题描述
我正在尝试使用 INDEX 和 MATCH 来实现基本查找.我的布局是:
<前>第 1 页姓名 |网站 |日期第 2 页姓名 |网站 |日期我希望工作表 1 中的站点"列自动填充工作表 2 中名称和日期匹配的站点.
我的尝试
=INDEX('Sheet2'!B:B,MATCH(A1,'Sheet2'!A:A,0))
这将成功匹配 NAME,但我如何将额外的 MATCH 合并到公式中以匹配 NAME 和 DATE?
我建议对此类问题的常规解决方案是连接搜索词对(即辅助列)并将连接后的对添加到查找中数组.
在上面的示例中,要查找的内容(而不是查找的位置)的串联是即时"完成的.
I am trying to achieve a basic lookup using INDEX and MATCH. My layout is:
Sheet 1 NAME | SITE | DATE Sheet 2 NAME | SITE | DATE
I want the 'SITE' column in Sheet 1 to automatically populate with the SITE from Sheet 2 where NAME and DATE match.
What I've Tried
=INDEX('Sheet2'!B:B,MATCH(A1,'Sheet2'!A:A,0))
This will successfully match NAME, but how can I incorporate an additional MATCH into the formula to match on both NAME and DATE?
I suggest the conventional solution to problems of this kind is to concatenate the pair of search terms (ie a helper column) and to add the concatenated pairs to the lookup array.
In the example above the concatenation of what to look up (rather than where to look up) is done 'on the fly'.
这篇关于使用具有两个条件的 INDEX 和 MATCH 进行查找的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!