Sumproduct(Averageifs

JamesBowdidge

New Member
Joined
Nov 8, 2018
Messages
46
Hi,

I use a variation of this formula quite a lot.. essentially a sumifs (or countifs) surrounded by a sumproduct to use the range in one of the criteria instead of stacking several lookups together..

=SUMPRODUCT(SUMIFS(RAWDATA!$D:$D,RAWDATA!$A:$A,$A$40:$A$46,RAWDATA!$BR:$BR,B$4))

Where the bold range is a list of items to look up rather than a single item, comes in handy..

I want to do this with an averageifs, but it doesnt work... so it would look like this...

=SUMPRODUCT(averageifs(RAWDATA!$D:$D,RAWDATA!$A:$A,$A$40:$A$46,RAWDATA!$BR:$BR,B$4))

any ideas?

thanks

James
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
The syntax is correct, so when you say that it doesn't work what exactly do you mean?
 
Upvote 0
It will mean at least one of your averageifs formulas is returning the error. You could add an iferror but then you need CTRL-SHIFT-ENTER too:

=SUMPRODUCT(IFERROR(AVERAGEIFS(RAWDATA!$D:$D,RAWDATA!$A:$A,$A$40:$A$46,RAWDATA!$BR:$BR,B$4),0))
 
Upvote 0
It will mean at least one of your averageifs formulas is returning the error. You could add an iferror but then you need CTRL-SHIFT-ENTER too:

=SUMPRODUCT(IFERROR(AVERAGEIFS(RAWDATA!$D:$D,RAWDATA!$A:$A,$A$40:$A$46,RAWDATA!$BR:$BR,B$4),0))


what a douchbag.. thanks steve, your absolutely right.. adding the iferror has fixed it.. much appreciated

thanks

J
 
Upvote 0

Forum statistics

Threads
1,215,614
Messages
6,125,839
Members
449,266
Latest member
davinroach

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