ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Count and then average (https://www.excelbanter.com/excel-worksheet-functions/6540-count-then-average.html)

Al

Count and then average
 
Hello,

In tab A I have my Raw data that consists of about 20 different performance
metrics sorted by name.

In Tab B I am putting together a breakdown of this. What I need is a
function that will count the instances of each name and then average the
results for one column for that employee.

Ie.. In tab A if "Joe" was 10 results out of 100 I want to get an avearge
of the results for just Joe.


duane


if names are in a1:t1 and results are in b2:t2


=average(if(a1:t1="Joe",b2:t2)) entered with control-shift-enter should
work

else

=sumif(a1:t1,"Joe",b2:t2)/countif(a1:t1,"Joe",b2:t2)


--
duane


------------------------------------------------------------------------
duane's Profile: http://www.excelforum.com/member.php...o&userid=11624
View this thread: http://www.excelforum.com/showthread...hreadid=314170


duane


sorry correction on the 2nd option

=sumif(a1:t1,"Joe",b2:t2)/countif(a1:t1,"Joe")


--
duane


------------------------------------------------------------------------
duane's Profile: http://www.excelforum.com/member.php...o&userid=11624
View this thread: http://www.excelforum.com/showthread...hreadid=314170


Myrna Larson

You can use an array formula:

=AVERAGE(IF(A1:A100="Joe",B1:B100))

entered with CTRL+SHIFT+ENTER,

or a "regular" formula (just use ENTER)

=SUMIF(A1:A100,"Joe",B1:B100)/COUNTIF(A1:A100,"Joe")



On Tue, 16 Nov 2004 19:09:05 -0800, "Al" wrote:

Hello,

In tab A I have my Raw data that consists of about 20 different performance
metrics sorted by name.

In Tab B I am putting together a breakdown of this. What I need is a
function that will count the instances of each name and then average the
results for one column for that employee.

Ie.. In tab A if "Joe" was 10 results out of 100 I want to get an avearge
of the results for just Joe.



tjtjjtjt

One way:
If the names are in Column A and the number in Column B, do this for each
name:
=AVERAGE(IF(A1:A100="Joe",B1:B100))

Press Ctrl+Shift+Enter for this Formula instead of just enter--it's an
array. If you entered it correctly, it'll look like (below), even though you
didn't type the curly brackets:
{=AVERAGE(IF(A1:A100="Joe",B1:B100))}

tj

"Al" wrote:

Hello,

In tab A I have my Raw data that consists of about 20 different performance
metrics sorted by name.

In Tab B I am putting together a breakdown of this. What I need is a
function that will count the instances of each name and then average the
results for one column for that employee.

Ie.. In tab A if "Joe" was 10 results out of 100 I want to get an avearge
of the results for just Joe.



All times are GMT +1. The time now is 10:45 PM.

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