SUMPRODUCT help to ignore #NA and #Value

mecheet

Board Regular
Joined
Apr 21, 2010
Messages
117
I have the below formula which works when i remove the #NA and #Values in column F on the RPT tab, but i need it to just ignore these.

=SUMPRODUCT((RPT!$F$6:$F$2793=$A8)*(RPT!CV$6:CV$2793)*(RPT!$M$6:$M$2793=Overview!$B8))/$H$3

any help appreciated
 
It should be easier to see where the formula errors out if you evaluate it step-by-step against a smaller data sample, for instance:

=SUMPRODUCT(--(ISERROR(RPT!$F$6:$F$8)=FALSE),--(RPT!$F$6:$F$8=$A8),(RPT!CV$6:CV$8),--(RPT!$M$6:$M$8=Overview!$B8))/$H$3

where in row 6 you have a value, in row 7 an NA error and in row 8 an #value error.
 
Upvote 0

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
thanks for that, it worked up until a point where there was an error, either #N/A or #VALUE

it appears to me that the formula is still looking at these in someway
 
Upvote 0
I have the below formula which works when i remove the #NA and #Values in column F on the RPT tab, but i need it to just ignore these.

=SUMPRODUCT((RPT!$F$6:$F$2793=$A8)*(RPT!CV$6:CV$2793)*(RPT!$M$6:$M$2793=Overview!$B8))/$H$3

any help appreciated

Switch to a formula type that is more powerful...

If column F is expected to house numbers:

Control+shift+enter, not just enter...
Code:
=SUM(
    IF(ISNUMBER(RPT!$F$6:$F$2793),
    IF(RPT!$F$6:$F$2793=$A8,
    IF(RPT!$M$6:$M$2793=Overview!$B8,
      RPT!CV$6:CV$2793))))

Otherwise:
Code:
=SUM(
    IF(1-ISERROR(RPT!$F$6:$F$2793),
    IF(RPT!$F$6:$F$2793=$A8,
    IF(RPT!$M$6:$M$2793=Overview!$B8,
      RPT!CV$6:CV$2793))))

On Excel 2007 or later...
Code:
=SUMIFS(
    RPT!CV$6:CV$2793,
    RPT!$F$6:$F$2793=$A8,
    RPT!$M$6:$M$2793=Overview!$B8)
 
Upvote 0

Forum statistics

Threads
1,224,518
Messages
6,179,256
Members
452,901
Latest member
LisaGo

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