AVERAGEIF With Multiple Criteria

Coachcasa

New Member
Joined
Feb 1, 2021
Messages
34
Office Version
  1. 2016
Platform
  1. MacOS
Hi everyone. I didn't find an answer to this question elsewhere, so I thought I'd ask and see if anyone can help me. I am trying to create a formula using AVERAGEIFS that is pulling criteria from three different columns and then giving me an average score from a fourth column if all of the other three columns meet the criteria. I can't get this to work and perhaps you can't do this or perhaps AVERAGEIF formula isn't suited to this. To give you a better feel for what I'm doing I'll make up a simplified version here with random imaginary criteria so I don't have to share everything with you. I want to get the average score from column A, but only when it meets a specific combination of criteria from columns B, C, and D at the same time. So for example, I want to know what the average score is if Column B registers "Hard", Column C registers "Sunny", and Column D registers "Work"

Column AColumn BColumn CColumn D
ScoreDifficultyWeatherLocation
50HardSunnyHome
80EasyRainyWork
70ModerateCloudySchool
60HardSunnyWork

Here is how I'm trying to build my formula, but it only results in #VALUE!
=AVERAGEIFS($A$2:$A$5,$B$2:$B$5,"Hard",$C$2:$C$5,"Sunny",$D$2:$D$5,"Work")

Please help me and tell me what I'm doing wrong or if this just won't work for what I want. I looked online at some different examples and put this together based on what I was seeing. However, either I'm missing something simple or am way off! Thanks for your help.
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Hi & welcome to MrExcel.
There's nothing wrong with your formula. Check that the average column does not have #VALUE! anywhere in it.
 
Upvote 0
Hi & welcome to MrExcel.
There's nothing wrong with your formula. Check that the average column does not have #VALUE! anywhere in it.
Thank you. I've often used this site for reference and thought this was a good time to ask a question I couldn't figure out. Some very smart people around here. There are no other cells with #VALUE! in them. The score column (A) I'm pulling from is based on a formula putting that score there and in the other three columns, there is the occasional blank cell, but that's it. I'm really frustrated trying to figure this out, as I think it should work.
 
Upvote 0
What is the formula in col A?
 
Upvote 0
What is the formula in col A?
It is simply calculating this value from another column to make sure this number is consistent. The column it pulls from has numbers in two different forms and makes them consistent. I tried using this formula with a number that isn't generated from a formula and it made no difference.
 
Upvote 0
The only way I can get your formula to return #VALUE! is if that error is in col A, which is why I asked what the formula was.
 
Upvote 0
The only way I can get your formula to return #VALUE! is if that error is in col A, which is why I asked what the formula was.
I don't know if it matters, but the formula in "column A" of my sheet is: =IF(C5="Ba 9",E5*2,IF(C5="Fr 9",E5*2,E5*1))

I tried changing my formula to pull from a column with static numbers versus one with a formula and it still resulted in the #VALUE! error.
 
Upvote 0
Do you have any conditional formatting on that column?
 
Upvote 0
The only way I can get your formula to return #VALUE! is if that error is in col A, which is why I asked what the formula was.
Do you have any conditional formatting on that column?
Well I figured out why I was getting that error. In my real sheet, one of the columns I'm pulling from is column I and I had two II next to each other, but I wasn't seeing it. Now however, instead of the Value error I'm now getting a #DIV/0! error!
 
Upvote 0
That would suggest that
a) Nothing meets the criteria.
b) The values in the average range are text
c) all the rows that meet the criteria have 0 in the average range.
 
Upvote 0

Forum statistics

Threads
1,215,334
Messages
6,124,319
Members
449,153
Latest member
JazzSingerNL

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