简体   繁体   English

如何在Excel 2007及更高版本中使用多个条件查找值

[英]How to lookup value with multiple criteria in excel 2007 and newer

I would like to lookup for a value in excel table with multiple criteria. 我想在具有多个条件的excel表中查找值。 I have tried this: 我已经试过了:

=INDEX($D$2:$D$10,MATCH(1,($B$2:$B$10=A13)*($C$2:$C$10=A13),0))

but it doesn't work. 但这不起作用。

I use this one: 我用这个:

=LOOKUP(2,1/(Reservation!$A:$A=$A20)/(Reservation!$B:$B=F$5)/(Reservation!$D:$D=0),Reservation!$C:$C) 

... which works fine, but it's extremely slow. ...效果很好,但速度非常慢。

Is there anyway to use index with multiple criteria? 无论如何,要使用具有多个条件的索引吗?

Normally with a single criteria all you would have to do is type: 通常,只有一个条件,您只需输入:

INDEX($D$2:$D$10,MATCH(A13,$B$2:$B$10,0))

And hit enter and you are done. 然后按Enter键 ,就完成了。

However, since you are using arrays inside your MATCH formula ie ($B$2:$B$10=A13) and ($C$2:$C$10=A13) you need to enter your formula using: 但是,由于您在MATCH公式内使用数组,即($B$2:$B$10=A13)($C$2:$C$10=A13) ,因此需要使用以下命令输入公式:

ctrl + shift + enter Ctrl + Shift + Enter

If you want further reading you can see Microsoft's Guidelines and examples of array formulas 如果您想进一步阅读,请参阅Microsoft 准则和数组公式示例

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

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