Div/0 error, ignoring blanks on weighted averages

CRGWRD

New Member
Joined
May 6, 2019
Messages
1
Hey Guys, First post.

Looking for some help. As the title says I'm working on a formula that does weighted averages while ignoring blanks, the formula works fine until I clear the cells and then I'm left with a Div/0! error.

I have this so far:

=SUMPRODUCT(C12:U12,$C$10:$U$10)/SUMPRODUCT(--(C12:U12<>""),$C$10:$U$10)


The weight of the assignments is in C:10 to U:10 and the marks are in C:12 to U:12
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Simplest:

=IFERROR(SUMPRODUCT(C12:U12,$C$10:$U$10)/SUMPRODUCT(--(C12:U12<>""),$C$10:$U$10), "")

Errata.... Ignore the suggested alternative (SUMIF). It works if C12:U12 are empty (no value). But not if they are the null string ("").
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,098
Messages
6,170,100
Members
452,301
Latest member
QualityAssurance

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