使用INDEX和MATCH进行查找,具有两个标准 [英] Lookup using INDEX and MATCH with two criteria

查看:189
本文介绍了使用INDEX和MATCH进行查找,具有两个标准的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用INDEX和MATCH来实现基本查找。我的布局是:

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

我希望Sheet 1中的SITE列可以从NAME和DATE匹配的表格2自动填充SITE。

I want the 'SITE' column in Sheet 1 to automatically populate with the SITE from Sheet 2 where NAME and DATE match.

我试过的

=INDEX('Sheet2'!B:B,MATCH(A1,'Sheet2'!A:A,0))

这将成功地匹配NAME,但是如何在公式中加入一个额外的MATCH来匹配 NAME DATE?

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆