[英]Sum named range consists of several columns and rows
I have a list that is divided into countries vertical and years horizontal like below.我有一个列表,分为垂直国家和水平年份,如下所示。
I need to sum all numbers for 2020 respective for each country.我需要总结每个国家 2020 年的所有数字。 Each country have several lines divided into different months.
每个国家/地区都有几条线路,分为不同的月份。
2020 2021
J | F | M | A | M |...| J | F | M | A | M |...
-------------------------------------------------------
Denmark | | | 15| | 12| | | | | | |
Norway | | | | | | | | | 10| | |
Germany | | | | 11| | | | | | | |
Each year have been called a named range, eg Year2020
.每一年都被称为一个命名范围,例如
Year2020
。 I have tried using =SUMPRODUCT(SUMIFS(Year2020;CountryRNG;Country))
, MATCH/INDEX
and also =SUM(INDEX(Year2020;0;MATCH(1E+99;INDEX(Year2020;1;0))))
.我曾尝试使用
=SUMPRODUCT(SUMIFS(Year2020;CountryRNG;Country))
、 MATCH/INDEX
和=SUM(INDEX(Year2020;0;MATCH(1E+99;INDEX(Year2020;1;0))))
。
How can I do this with one formula?我怎样才能用一个公式做到这一点?
You can use SUMPRODUCT:您可以使用 SUMPRODUCT:
=SUMPRODUCT((Country=CountryRNG)*Year2020)
With a few notes:有几个注意事项:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.