Match function to match multiple values

試著忘記壹切 提交于 2019-12-13 11:04:51

问题


I have two columns

Column A   Column B 
Apple       A
banana      B
Grape       C
Apple       D
Banana      F

Now I want to find the row number for row which has data Apple & D.

Is their a way to use Match function to get the row number?


回答1:


You can use this one:

=LOOKUP(2,1/(A1:A5="Apple")/(B1:B5="D"),ROW(A1:A5))

or non-volatile version (if your ranges starts from first row):

=MATCH(2,1/(A1:A5="Apple")/(B1:B5="D"))

with array entry (CTRL+SHIFT+ENTER).




回答2:


Alternate, does not require array entry:

=MATCH(TRUE,INDEX(A1:A5&B1:B5="Apple"&"D",),0)



回答3:


Try this !!

=SUMPRODUCT((MATCH(1,(A1:A5="Apple")*(B1:B5="D"),0)))

Array formula CTRL+SHIFT+ENTER



来源:https://stackoverflow.com/questions/23372813/match-function-to-match-multiple-values

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!