ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Using Sumproduct to Find Average (https://www.excelbanter.com/excel-discussion-misc-queries/103051-using-sumproduct-find-average.html)

stevec

Using Sumproduct to Find Average
 
Tried, couldn't do it: this formula doesn't work, returns #value:

=SUMPRODUCT(--(Performance!$A$2:$A$1000=A16),AVERAGE(Performance !G2:G1000))

Thanks for your help:

Data Table followed by Output Table (need formula for output)

Sheet1
ColA ColG
Apples 5
Apples 6
Apples 7
Oranges 4
Oranges 8
Bannanas 6
Bannanas 4
Bannanas 2
Bannanas 4
Pineapples 3

Sheet 2
Output Table

ColA ColB (average of apples, oranges, etc.) -- need fomula for
this
Apples 6
Oranges 6
Bannanas 4
Pineapples 3

stevec

Using Sumproduct to Find Average
 
=SUMPRODUCT(--(Performance!$A$2:$A$1000=A2),--(Performance!$G$2:$G$1000))/COUNTIF(Performance!$A$2:$A$1000,A2)

Thanks to Alan at another post...

Biff

Using Sumproduct to Find Average
 
Or this array formula:

=AVERAGE(IF(Performance!$A$2:$A$1000=A2,Performanc e!$G$2:$G$1000))

Biff

"SteveC" wrote in message
...
=SUMPRODUCT(--(Performance!$A$2:$A$1000=A2),--(Performance!$G$2:$G$1000))/COUNTIF(Performance!$A$2:$A$1000,A2)

Thanks to Alan at another post...





All times are GMT +1. The time now is 08:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com