# Average of multilpe Sumproduct formulas

#### jmersing

##### Well-known Member
I'm using the following formulas to get an average of three different ranges. The problem is if one of the ranges has a zero it waters down the average of the whole formula. For example

If the results for each formula are: 10 - 10 - 0 I would want to return the avergae of 10 not 6.6.

Formula
=AVERAGE((SUMPRODUCT(--(SiteRange=Q\$9),--(WeekRange=TrendWk1),--(AreaRange=\$B154),Trend!\$N\$2:\$N\$1250)),(SUMPRODUCT(--(SiteRange=Q\$9),--(WeekRange=TrendWk2),--(AreaRange=\$B154),Trend!\$N\$2:\$N\$1250)),(SUMPRODUCT(--(SiteRange=Q\$9),--(WeekRange=TrendWk3),--(AreaRange=\$B154),Trend!\$N\$2:\$N\$1250)))

### Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

#### Gerald Higgins

##### Well-known Member
I guess one way would be to put the individual sumproduct formulas into three separate cells (eg A1, B1 and C1) and then work out your average as
Code:
``=sum(A1:C1)/countif(A1:C1,">0")``
There might be a more elegant solution . . .

#### Jon von der Heyden

##### MrExcel MVP, Moderator
Or along the same lines:

=AVERAGE(IF(A1:C1<>0,A1:C1))

confirmed with ctrl+shift + enter as this is an array formula

#### jmersing

##### Well-known Member
Thanks Guys I'll give it a try

Replies
7
Views
405
Replies
7
Views
641
Replies
5
Views
787
Replies
3
Views
442
Replies
1
Views
531

1,181,102
Messages
5,928,072
Members
436,586
Latest member
latintxn

### 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?

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