[英]How to calculate the average by a unique identifier on Excel 2013
Assuming i have a data with multiple repetition of unique identifiers, how do i calculate the average by these unique identifiers. 假设我的数据具有唯一标识符的多次重复,我如何通过这些唯一标识符来计算平均值。 The actual data has 10,000 rows so it is difficult to do a filter and sort to calculate the average.
实际数据有10,000行,因此很难进行过滤和排序以计算平均值。 it becomes very exhaustive and manual for me.
对我来说,它变得非常详尽和手动
Basing on Gary Student
's layout, If I understand you correctly, you want something like this: 基于
Gary Student
的布局,如果我理解正确,那么您需要以下内容:
For all the Chairs, 对于所有椅子,
Total Quantity: 28+13+5 = 46 总数量:28 + 13 + 5 = 46
Total Price: (28*12) + (13*14) + (5*22) = 628 总价:(28 * 12)+(13 * 14)+(5 * 22)= 628
Weighted Average Price: 628/46 = 13.65217391 加权平均价格:628/46 = 13.65217391
I have the following formulas 我有以下公式
G2
: =SUMIF($A$2:$A$9,$F2,$B$2:$B$9)
G2
: =SUMIF($A$2:$A$9,$F2,$B$2:$B$9)
H2
: =AVERAGEIF($A$2:$A$9,$F2,$C$2:$C$9)
H2
: =AVERAGEIF($A$2:$A$9,$F2,$C$2:$C$9)
I2
: =SUMPRODUCT(($B$2:$B$9*$C$2:$C$9)*($A$2:$A$9=$F2))/SUMIF($A$2:$A$9,$F2,$B$2:$B$9)
I2
: =SUMPRODUCT(($B$2:$B$9*$C$2:$C$9)*($A$2:$A$9=$F2))/SUMIF($A$2:$A$9,$F2,$B$2:$B$9)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.