AVERAGEIFS with SUM as AVERAGE_RANGE

MrPez

Board Regular
Joined
Jan 28, 2010
Messages
128
I'm trying to get a formula working that averages a bunch of numbers based on two conditions. The problem I'm having is that my Average_rng needs to be the sum of two other cells and it doesn't seem to work.

Can anyone help?

My formula is:

Code:
=AVERAGEIFS(SUM('Input Data'!K:L),'Input Data'!H:H,A4,'Input Data'!J:J,">0")
I'm trying to set this as an array formula but it won't accept. :(

If I have an other column that sums columns K and L it works but this isn't really feasable unfortunately.
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
See if these work:

=AVERAGE(IF('Input Data'!H1:H100=A4,IF('Input Data'!J1:J100>0,'Input Data'!K1:K100+'Input Data'!L1:L100)))

entered CTRL-SHIFT-ENTER (note the restricted ranges so change to suit) or:

=AVERAGEIFS('Input Data'!K:K,'Input Data'!H:H,A4,'Input Data'!J:J,">0")+AVERAGEIFS('Input Data'!L:L,'Input Data'!H:H,A4,'Input Data'!J:J,">0")
 
Upvote 0
Thanks for trying but sadly they don't work. First gives an error and second doesn't actually give the right answer.
Not to worry, I'll have to figure out how to have another column to do the calculations.
 
Upvote 0
a suggestion in column M add or do the sum of column K and L and then apply =averageifs.

eg:- K L M
1 1 =sum(k2+l2)
 
Last edited:
Upvote 0
a suggestion in column M add or do the sum of column K and L and then apply =averageifs.

eg:- K L M
1 1 =sum(k2+l2)

That wouldnt address the issue that the OP didnt want to use a helper column. The two formulas i provided would actually produce the same answer as a helper column produced in this way hence why i asked for sample data and expected results.
 
Upvote 0
Ok, so with the data below I'd like to know the average of the sum of columns B and C where column A is ACB. The result I'd expect is 334.6667.

[TABLE="width: 256"]
<tbody>[TR]
[TD="width: 64"]ACA[/TD]
[TD="width: 64, align: right"]512[/TD]
[TD="width: 64, align: right"]0[/TD]
[TD="width: 64, align: right"][/TD]
[/TR]
[TR]
[TD]ACB[/TD]
[TD="align: right"]123[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD]ACB[/TD]
[TD="align: right"]155[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD]ACB[/TD]
[TD="align: right"]131[/TD]
[TD="align: right"]995[/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD]ACB[/TD]
[TD="align: right"]54[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD]ACB[/TD]
[TD="align: right"]545[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD]ACB[/TD]
[TD]NULL[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD]ACC[/TD]
[TD="align: right"]566[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"][/TD]
[/TR]
</tbody>[/TABLE]

Thanks for your help!
 
Upvote 0
Your original formula used 4 columns. H,J,K,L. The data you have given is 3?
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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