简体   繁体   English

Excel 公式索引匹配 2 个标准

[英]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. $B4 是外部电子表格的 A 列中的特定国家/地区,因此 '[World Population.xlsx]Sheet1':$A.$A 包含名称 $B4,对于第 2 行。它有年份。 Excel is telling me #N/A? Excel 告诉我#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))

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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