AVERAGEIFS

davin1130

New Member
Joined
Mar 15, 2019
Messages
39
I have a file that keeps track of values and zones. I'm trying to use "AVERAGEIFS" to find the average of values in column "F" for only zones 1 & 3 in column "G". When i perform the action using AVERAGEIFS it creates 2 different averages … an average over F8:F17 for all G8:G17 having a value of "1" and an average over F8:F17 for all G8:G17 having a value of "3", INSTEAD of getting a single average for range F8:F17 with G8:G17 having values of 1 or 3 ??? What can i do to accomplish this. I've attached a snapshot of my file. I tried to use "SUM" then divide by 2 to see if i could get the same answer.

1617117811121.png
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
One of these maybe?

=AVERAGE(FILTER(F8:F17,(G8:G17=1)+(G8:G17=3)>0))
=SUMPRODUCT(--((G8:G17=1)+(G8:G17=3)>0),F8:F17)/SUMPRODUCT(--((G8:G17=1)+(G8:G17=3)>0))
 
Upvote 0
One option
Excel Formula:
=SUM(SUMIFS(F8:F17,G8:G17,{1,3}))/SUM(COUNTIFS(G8:G17,{1,3}))
or with that data
Excel Formula:
=AVERAGEIFS(F8:F17,G8:G17,"<>2")
 
Upvote 0
Solution

Forum statistics

Threads
1,215,514
Messages
6,125,263
Members
449,219
Latest member
daynle

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