一列的值求和,其中另一列中的值恒定的区域 [英] sum values of a column for regions where values in another column are constant
本文介绍了一列的值求和,其中另一列中的值恒定的区域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要编写一个excel公式,该列将为我提供给定列Colums Cat(category)和Val(value)的Sum列.根据cat中的值,将val中的值按区域分开,并计算每个区域的总和
I need to write an excel formula which will provide me with the column Sum given colums Cat(category) and Val(value). Based on the values in cat, values in val are separated in regions and sum is calculated for every region
Cat Val Sum
1 1
1 2
1 7
1 8 18
2 9
2 14
2 15
2 16 54
3 17
3 19
3 20
3 21 77
1 22
1 23
1 24
1 25
1 26 120
推荐答案
尝试,
=IF(A2<>A3, SUM(B2:INDEX(B:B, AGGREGATE(14, 6, ROW($2:2)/((A$2:A2=A2)*(A$1:A1<>A2)), 1))), TEXT(,))
这篇关于一列的值求和,其中另一列中的值恒定的区域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文