Averageing based on other cell values

drewberts

Board Regular
Joined
Sep 5, 2013
Messages
177
Office Version
  1. 365
Platform
  1. Windows
Hi

I have a spreadsheet with my staff listed across row 1. Row 2 contains their salaries and row 3 contains their department.

I want to average the salaries of employees based on their department e.g.

Alan Tom Helen
100 150 200
HR HR Admin

I looking for a formula that would return an average of 125 when I set the criteria (which can be fixed) as "HR"

Hope that makes sense
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Try =AVERAGIF(C1:C3,"HR",B1:B3)
(if you have a post 2003 version)
 
Upvote 0
Thanks arthurbr

Knew it would be something simple - didn't work at first but noticed the typo in your formula, so all sorted. Thanks for the quick response
 
Upvote 0
Yep, good work. The E got stuck in my keyboard :)
Corrected version for other members =AVERAGEIF(C1:C3,"HR",B1:B3)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,162
Messages
6,170,431
Members
452,326
Latest member
johnshaji

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