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
2 Answers
Reset to default 2There 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)