简体   繁体   中英

Excel Formula INDEX MATCH with 2 criteria

I'm trying to get the specific population for a country in a certain year. $B4 is a specific country while in an external spreadsheet's column A, hence '[World Population.xlsx]Sheet1':$A.$A contains the name $B4, For row 2. it has the years. Excel is telling me #N/A? I'm not sure what did I do wrong with the formula?

=INDEX('[World Population.xlsx]Sheet1'!$A$3:$BX$291,MATCH($B4,'[World Population.xlsx]Sheet1'!$A:$A,0),MATCH("1999", '[World Population.xlsx]Sheet1'!$2:$2),0)

You have the penultimate bracket in the wrong place, and you should line your ranges up:

=INDEX('[World Population.xlsx]Sheet1'!$B$3:$BX$291,MATCH($B4,'[World Population.xlsx]Sheet1'!$A$3:$A$291,0),MATCH("1999", '[World Population.xlsx]Sheet1'!$B$2:$BX$2,0))

or if the year is stored as a number, use:

=INDEX('[World Population.xlsx]Sheet1'!$B$3:$BX$291,MATCH($B4,'[World Population.xlsx]Sheet1'!$A$3:$A$291,0),MATCH(1999, '[World Population.xlsx]Sheet1'!$B$2:$BX$2,0))

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM