Ignoring blanks using a Conditional SUMPRODUCT formula

winemakerl

New Member
Joined
Nov 11, 2016
Messages
2
[TABLE="width: 142"]
<tbody>[TR]
[TD][/TD]
[/TR]
</tbody><colgroup><col></colgroup>[/TABLE]
Hello everyone,
Thanks in advance for your help, thanks also for all the previous solutions I've found.
I am using a SUMPRODUCT formula with conditions to determine weighted averages of analyses against volumes. My issue is that not all analyses have been entered, and my formula is including blanks as 0, rather than ignoring.
Here is my formula:
=SUMPRODUCT('J&S'!N2:N1000*'J&S'!E2:E1000*('J&S'!B2:B1000="WRHS"))/SUMIF('J&S'!B2:B1000,"WRHS",'J&S'!E2:E1000)

column N are my analyses
column E are my volumes
column B are my conditions, in this example "WRHS"

I have several blanks in column N for analyses that have not yet been determined.

Any advice would be appreciated, please let me know if I have not included enough information or described my spreadsheet appropriately.
Cheers, L
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
See if this works for you:

=SUMPRODUCT(('J&S'!N2:N1000)*('J&S'!E2:E1000)*('J&S'!B2:B1000="WRHS"))/SUMPRODUCT(('J&S'!B2:B1000="WRHS")*('J&S'!E2:E1000)*ISNUMBER('J&S'!N2:N1000))
 
Upvote 0
A weighted average calculation would be a tad faster using SUMPRODUCT in native syntax...

=SUMPRODUCT(--ISNUMBER('J&S'!N2:N1000),'J&S'!N2:N1000,'J&S'!E2:E1000,--('J&S'!B2:B1000="WRHS"))/SUMIFS('J&S'!E2:E1000,'J&S'!B2:B1000,"WRHS",'J&S'!N2:N1000,"<>")
 
Upvote 0

Forum statistics

Threads
1,223,883
Messages
6,175,167
Members
452,615
Latest member
bogeys2birdies

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