使用 vlookup 或索引/匹配函数对多行的值求和 [英] Sum values from multiple rows using vlookup or index/match functions
本文介绍了使用 vlookup 或索引/匹配函数对多行的值求和的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想使用公式对 B、C 和 D 列中的值求和.我尝试将 SUMIF
、VLOOKUP
和 INDEX
与 MATCH
结合使用,但没有成功.
I want to sum the values in columns B, C, and D using a formula. I tried combining SUMIF
, VLOOKUP
and INDEX
with MATCH
but no luck.
我想查找法国,然后将 B、C 和 D 中的值相加.
I would like to look for France and then add the values in B, C and D.
我试过了:
=SUM(VLOOKUP(A9,A1:D5,{2,3,4,},FALSE))
但它返回第一行的总值,不包括第三行:
But it returns the total value from the first row and does not include the 3rd row:
A B C D
1 FRANCE 152 252 354
2 ITALY 255 184 328
3 FRANCE 221 215 114
4 SPAIN 215 255 356
5 USA 125 222 584
6
7
8 TOTAL PER COUNTRY
9 FRANCE
10 SPAIN
推荐答案
=SUMPRODUCT((A1:A5="FRANCE")*B1:D5)
这篇关于使用 vlookup 或索引/匹配函数对多行的值求和的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文