简体   繁体   English

Excel匹配多个条件

[英]Excel Match multiple criteria

Could someone help me turn this 2 Criteria match function into a 4 criteria match function please? 有人可以帮我把这2个标准匹配功能变成4个标准匹配功能吗? This one works, but is only the start: 这是可行的,但仅仅是开始:

=INDEX(range1,MATCH(1,(A19=range2)*(B19=range3),0))

I also want a third and fourth match in the above formula, with those two being an OR option. 我还希望上面公式中的第三和第四个匹配项,而这两个是OR选项。 I thought based upon the working version that this might work, but it doesn't: 基于工作版本,我认为这可能有效,但是它不起作用:

=INDEX(range1,MATCH(1,(A19=range2)*(B19=range3)*(OR(C19=range4,D19=range5)),0))

I've been trying to use AND commands, my initial version of the first code above being this: 我一直在尝试使用AND命令,上面第一个代码的初始版本是这样的:

=INDEX(range1,MATCH(1,AND(A19=range2,B19=range3),0))

It always returns #N/A after CTRL+ALT+ENTER is entered though, so it's obviously an issue with my understanding of either MATCH or AND (or both I guess), 不过,在输入CTRL + ALT + ENTER之后,它总是返回#N / A,所以显然我对MATCH或AND(或我猜都是)的理解是一个问题,

The first example works EXACTLY as intended, but unfortunately I don't know why and I can't work it out well enough to adapt it. 第一个示例完全按预期工作,但是不幸的是,我不知道为什么,我也无法很好地适应它。 Maybe I'm too tired and have run out of space in my head for the peculiar way in which Excel formulas work, but I've read and re-read the help files for them and still it doesn't make sense to me. 也许我太累了,脑子里没有足够的空间来处理Excel公式的特殊工作方式,但是我已经阅读并重新阅读了它们的帮助文件,但对我来说仍然没有意义。

Any help would be greatly appreciated, as always. 一如既往,任何帮助将不胜感激。

Thanks, 谢谢,

Joe

我只是在猜测,但这行得通吗?

=INDEX(range1,MATCH(1,(A19=range2)*(B19=range3)*(((C19 = range4)+(D19 = range5))>0),0))

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

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