Find the number of a row that contains two specific values?

痞子三分冷 提交于 2019-12-29 08:51:45

问题


I have a table of information with multiple columns. The first column is "Date" (range A:A) and the second column is "Name" (range B:B). When I enter a date into cell Q1 and a name into cell R1, I need a formula that will find which row contains both of those values and output the row number.

I feel like I need to use the match function but can't quite figure it out. Does anyone know how to do this?


回答1:


You can use MATCH in an "array formula" like this

=MATCH(1,(A:A=Q1)*(B:B=R1),0)

which needs to be confirmed with CTRL+SHIFT+ENTER

....or add an INDEX function and the formula can be entered normally

=MATCH(1,INDEX((A:A=Q1)*(B:B=R1),0),0)



来源:https://stackoverflow.com/questions/19307976/find-the-number-of-a-row-that-contains-two-specific-values

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