最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Excel: how to search by two rows and one column - Stack Overflow

programmeradmin0浏览0评论

I have the attached file. In the first row, I can see the position of the player. In the second, the number. Based on this, I would like to know if the player played in the country listed in the downside. For example, I would like to query: Position= PG; Number= 2; Country = China and to get back Yes as response.

I have the attached file. In the first row, I can see the position of the player. In the second, the number. Based on this, I would like to know if the player played in the country listed in the downside. For example, I would like to query: Position= PG; Number= 2; Country = China and to get back Yes as response.

Share Improve this question edited Jan 19 at 22:36 Michal 6,1534 gold badges26 silver badges43 bronze badges asked Jan 19 at 21:53 Miguel SantosMiguel Santos 1369 bronze badges 1
  • 2 Please edit your question to provide more background details on your problem. Telling readers about your research, what you have already tried, and why it didn’t meet your needs will allow them to understand it better. Please convert images into text, and use a code block for any code you have. Readers can then search the text or run the code to reproduce your issue. – Michal Commented Jan 19 at 22:14
Add a comment  | 

2 Answers 2

Reset to default 2

There are dozens of ways of doing it. Perhaps the simplest one will be using INDEX and MATCH which should work on any Excel version:

=INDEX(A1:E5,
      MATCH("Spain",A1:A5,0),
      MATCH(1, (A1:E1="SG")*(A2:E2=1), 0))

A lot of ways to achieve this. One of:

=XLOOKUP("China",A6:A9,FILTER(B6:G9,(B1:G1="PG")*(B2:G2=2)),"Not found",0)

发布评论

评论列表(0)

  1. 暂无评论