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

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
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,224,815
Messages
6,181,135
Members
453,021
Latest member
Justyna P

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