index match with multiple criteria in rows

我与影子孤独终老i 提交于 2019-12-24 20:54:55

问题


I am working on a spreadsheet in which I have ticker id in column B, members corresponding to those tickers in column I and rates in column J.

Rates change depending upon the no. of members, so one ticker ids can be in multiple rows.

In my output, I need the rate for a particular ticker id and member. It should lookup exact ticker id but if no. of members is not there in data then it should pick the largest value that is less than or equal to lookup_value.

I have attached snapshot of the data and desired output. any help will be highly appreciated.

I have tried

=INDEX(J2:J57,MATCH(1,(L2=B2:B57)*(L4=I2:I57),0))  

but this is looking for exact match however I need exact match for 1 criteria and greater than match for second


回答1:


Use:

=INDEX($J$2:$J$57,MATCH(1,(L3=$B$2:$B$57)*(M3<=$I$2:$I$57),0))

This is an array formula and needs to be confirmed with Ctrl-Shift-Enter instead of Enter when exiting edit mode. If done correctly then Excel will put {} around the formula. If not done correctly you will receive #N/A



来源:https://stackoverflow.com/questions/48469980/index-match-with-multiple-criteria-in-rows

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