Averageifs formula - can you search for two different criteria in one criteria range

CLARE83

New Member
Joined
Jun 11, 2014
Messages
28
Hi,

I am working on spreadsheet in which I have a column of data (combined score) for which I need to find the average off if they match 2 different criteria's (status - A and P)in a different column.

Below is an example of the data.

Can anyone advise of the formula I keep hitting a brick wall!!!

Thanks in advance


MonthSTATUSCombined Sccore
JANN31
FEB31
MAR25
APR27
MAYA27
JUNP11
JULYP23
AUG25
SEP27
OCT25

<tbody>
</tbody>
 
Thanks,

Do you know if the sum/sumif formula's will work if they are on a different marksheet, the formula im using now comes back #N/A


Clare, could be just a typo giving a mismatch of ranges. Missing 7


=SUMPRODUCT(((Sheet1!F2:F237="A")+(Sheet1!F2:F237="P")+(Sheet1!F2:F237="S")*Sheet1!P2:P237/SUMPRODUCT((Sheet1!F2:F237="A")+(Sheet1!F2:F237="P")+(Sheet1!F2:F237="S"))))
 
Upvote 0

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Thanks,

Do you know if the sum/sumif formula's will work if they are on a different marksheet, the formula im using now comes back #N/A

The formula is -

=SUMPRODUCT(((Sheet1!F2:F237="A")+(Sheet1!F2:F237="P")+(Sheet1!F2:F23="S")*Sheet1!P2:P237/SUMPRODUCT((Sheet1!F2:F237="A")+(Sheet1!F2:F237="P")+(Sheet1!F2:F237="S"))))

F2:F237 IS STATUS AND P2:P237 IS COMBINED SCORE

Thanks

Clare

SumIfs/CountIfs will work with ranges on a different sheet. If you are talking about a different workbook, that's a different matter.
 
Upvote 0
Thanks all for all your help it is appreciated. Just one last question, I wanted to add an additional criteria into the formula. If using the formula above (by Tony) (SUMPRODUCT) I want to find the average of - If column A = JAN & Column B= A
+P the average would be ?

Below is the data

MONTHSTATUSCombined SCORE
JANA27
FEB 25
MAR 29
APR 29
MAY 33
JUNP19
JUL 21
AUG 21
JANA29
FEB 29
MAR 27
<colgroup><col width="234" style="width: 176pt; mso-width-source: userset; mso-width-alt: 8334;"> <col width="64" style="width: 48pt;" span="2"> <tbody> </tbody>

Hope this makes sense.

Kind regards

Clare
 
Upvote 0
Purely because the sumproduct formula above worked, If there is another one that can be used?!?!!?
 
Upvote 0
Thank you Aladin that's really helpful, can I still use the same formula if I wanted to add another condition (column A - for a particular month)? Fairly new to multiple conditions and finding it hard to get the right formula with out an error message coming back.

Thanks again

Clare
 
Upvote 0
Thank you Aladin that's really helpful, can I still use the same formula if I wanted to add another condition (column A - for a particular month)? Fairly new to multiple conditions and finding it hard to get the right formula with out an error message coming back.

Thanks again

Clare

Sure. For JAN we get:

=SUM(SUMIFS(C2:C11,A2:A11,"JAN",B2:B11,{"A","P"}))/MAX(1,SUM(COUNTIFS(A2:A11,"JAN",B2:B11,{"A","P"})))

=IFERROR(SUM(SUMIFS(C2:C11,A2:A11,"JAN",B2:B11,{"A","P"}))/SUM(COUNTIFS(A2:A11,"JAN",B2:B11,{"A","P"})),"")
 
Upvote 0
Hi all, using the above formula how would I count blank cells? I have tried " " and this is not picking the cell up?

Thanks in advance

Clare
 
Upvote 0

Forum statistics

Threads
1,215,432
Messages
6,124,859
Members
449,194
Latest member
HellScout

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