简体   繁体   中英

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. it becomes very exhaustive and manual for me.

Consider the following very simple example:

在此处输入图片说明

The identifiers are in column A and the values to be averaged are in column B . The formula in E1 is:

=AVERAGEIFS($B$1:$B$9,$A$1:$A$9,D1)

Basing on Gary Student 's layout, If I understand you correctly, you want something like this:

For all the Chairs,
Total Quantity: 28+13+5 = 46
Total Price: (28*12) + (13*14) + (5*22) = 628
Weighted Average Price: 628/46 = 13.65217391

I have the following formulas

G2 : =SUMIF($A$2:$A$9,$F2,$B$2:$B$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)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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