Find and count name in range and calculate average of scores on different (fixed) row

DaveFranken

New Member
Joined
May 6, 2020
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi everyone,

I've been looking for a proper and efficient way to solve my problem, but I just can't figure it out.

I have a table with some results where each instance is on a seperate column and details are found on different rows in that column (for example which employees were present). See the image attached, result table on the left.

Out of this table, I need to know for each employee how often they appear and what their average score is by filling in the table on the right side.

Getting the count is easy, but I just can't seem to find an efficient way of calculating the average. I tried the sumif function, but that doesnt allow me to have multiple rows in my range.

How should I approach this?
Person A as example; in cell O4 i need a formula that uses M4 as criteria and look for that in range C6:G11. Then for every match, sum the value in row 5 (score) and then take the average of all instances.

Your support in this is much appreciated! Thnx!
 

Attachments

  • Capture2.PNG
    Capture2.PNG
    14.1 KB · Views: 14

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Welcome to the forum.

Depending on which version of Excel you are running, you might need to enter the array formula in ColO with CtrlShiftEnter.

Notice I had to put in sample data for testing purposes.

MrExcel posts18.xlsx
CDEFGHIJKLMNO
3workmancountaverage
4a391.67%
580%95%100%b290.00%
6a2athreeb120c180.00%
7banaecrapa-3d0no data
8ctestfjunkf#N/Ae195.00%
9f297.50%
Sheet23
Cell Formulas
RangeFormula
N4:N9N4=COUNTIFS($C$6:$G$8,M4)
O4:O9O4=IF(N4=0,"no data",AVERAGE(IF($C$6:$G$8=M4,$C$5:$G$5)))
H8H8=NA()
 
Last edited:
Upvote 0
Yiihaa! Works like a charm! Thank you very much for both the welcome and the solution for my problem!

By now I've learned quite a few things about excel and vba, but the use of arrays was one of few things I never did before. Perhaps I should look into that a little more.

Cheers!
 
Upvote 0
You're welcome.

Looking into arrays? Look no further than ExcelIsFun on YouTube. Mike wrote the book on CSE. Here are two Playlists to get you sorted.


 
Upvote 0

Forum statistics

Threads
1,215,506
Messages
6,125,189
Members
449,213
Latest member
Kirbito

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