Sumifs or Sum Product

rex759

Well-known Member
Joined
Nov 8, 2004
Messages
610
Office Version
  1. 365
Platform
  1. Windows
Hello,
I’m stuck trying to figure out what to use to get the correct results

In short, I want to add the results for each employee’s numbers in Column B that belong to the correct Managers name in Column E. Then, show the averages starting in cell E14 (Managers Total)

In my example, the average for Mr. Smith would be 4.29 since it would include the results from Amy & Darren. Mr. Jones would be 4.5 because of Mike’s numbers and Mrs. Peabody would 5 for Bills number

I thought it wouldn’t be simple but how do you relate the information in Columns D:E with Columns A?

Hope this makes sense to someone. Thanks for any help.
Excel Workbook
ABCDE
1Results NameResults ScoreEmployeesManager
2Amy5AlexMr Smith
3Darren5AmyMr Smith
4Darren4MikeMr Jones
5Darren3BrennanMr Jones
6Darren4BrianMrs Peabody
7Darren5FrankMrs Peabody
8Darren4BillMrs Peabody
9Bill5PhillMr Smith
10Mike4PhillMr Smith
11Mike5DarrenMr Smith
12
13Manager Totals
14Mr Smith4.29
15Mr Jones4.5
16Mrs Peabody5
Sheet1
Excel 2010
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Try

Array formula in E14 copied down
=SUM(SUMIF($A$2:$A$11,IF(E$2:E$11=D14,$D$2:$D$11),B$2:B$11))/SUM(COUNTIF(A$2:A$11,IF(E$2:E$11=D14,$D$2:$D$11)))
confirmed with Ctrl+Shift+Enter, not just Enter

M.
 
Upvote 0
Brilliant!! I would have never got that! Works perfectly. Thanks for the quick response.
 
Upvote 0
A slightly shorter version, also needing Control+Shift+Enter:

=AVERAGE(IFERROR(($B$2:$B$11/COUNTIFS($D$2:$D$11,$A$2:$A$11,$E$2:$E$11,D14)),""))

It assumes that each employee is only entered once in the D:E table though, per manager.
 
Last edited:
Upvote 0
Thank you Eric. I used a version of yours for another set of variables that I was stuck on that worked perfectly. Thanks very much
 
Upvote 0

Forum statistics

Threads
1,223,952
Messages
6,175,596
Members
452,657
Latest member
giadungthienduyen

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top