SUMPRODUCT Ignore blanks

onthegreen03

Board Regular
Joined
Jun 30, 2016
Messages
148
Office Version
  1. 365
Platform
  1. Windows
Hi - I am using a SUMPRODUCT formula to calculate a weighted average and I want to modify it so it ignores cells that are blank. My formula is below ... the blank cells could appear in column E. Thanks as always for the help!

=SUMPRODUCT($M$6:M$1005,E$6:E$1005/SUM($E$6:$E$1005))
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Blanks have no numeric value so ignoring them will make no difference to the result.
 
Upvote 0
But when I run the formula as is I get a #VALUE! error. When I modify it to only include the rows currently with data (through row 229) I get the right result. How can I avoid getting the error and still include the entire range down to row 1005?
 
Upvote 0
There was no mention of errors in your original post, that tells me that your blanks are formulas rather than just blank / empty cells.
Excel Formula:
=SUMPRODUCT($M$6:M$1005,IFERROR(E$6:E$1005/SUM($E$6:$E$1005),0))
 
Upvote 0
Solution
Beautiful, thanks. Sorry about not mentioning that column E did include formulas. Appreciate the help!
 
Upvote 0

Forum statistics

Threads
1,215,013
Messages
6,122,690
Members
449,092
Latest member
snoom82

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