#N/A Error with SUMPRODUCT

geliseev

Board Regular
Joined
Feb 3, 2009
Messages
79
Hi,

I am trying to use the SUMPRODUCT formula in the following format:
SUMPRODUCT(--(....),--(....),()) to look up 2 conditions and sum the product of those.

I have 4 different tabs that are my raw data to look up against - on 3 of the tabs the formula works fine. On the fourth tab, it gives a #N/A error and I have no idea why. The data is pretty similar on all tabs, so I cannot possibly pinpoint why it would work on one and not the other.

Here's an example:
=SUMPRODUCT(
--('New Sales-YTD'!$AD$3:$AD$64000=$C159),
--('New Sales-YTD'!$G$3:$G$64000=$B159),
('New Sales-YTD'!$T$3:$T$64000))

it seems pretty straightforward:
- the range AD contains date information
- the range G contains market information
- the range T is the sales value

The only difference that I can see between the tabs where the formula works and the one that it does not work on is that the last tab has negative values in the T range? Other than that it is all the same stuff...

When I try to do a SUMIF or VLOOKUP I get no errors. The #NA error only shows up with SUMPRODUCT...

Any ideas ??

Thanks.
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
I've run into problems before with a SUMPRODUCT when I have errors in the data - as in, all the data that your formula looks at, if there's an error in there the SUMPRODUCT stopped working.

Do you have any errors in your data?
 
Upvote 0
Try to the following...

=COUNTIF(Range,#N/A)

in order to see if there is #N/A somewhere?

Do you have any retrieval formulas (like one with VLOOKUP) in the relavant ranges?
 
Upvote 0
Try to the following...

=COUNTIF(Range,#N/A)

in order to see if there is #N/A somewhere?

Do you have any retrieval formulas (like one with VLOOKUP) in the relavant ranges?

yes, it seems like there were some #N/A's in the data...thanks guys, got it sorted out :)
 
Upvote 0
If you look for posts by me from earlier this evening, jonmo gives a very good explanation of why sumproduct fails at the error and sumif overlooks it. Basically if sumif hits an error at either the criteria range or the range to sum, it replaces anything not fitting the criteria with a 0 whereas sumproduct throws a huff and says no way! I

i think thats what he said :LOL:
 
Upvote 0
If you look for posts by me from earlier this evening, jonmo gives a very good explanation of why sumproduct fails at the error and sumif overlooks it. Basically if sumif hits an error at either the criteria range or the range to sum, it replaces anything not fitting the criteria with a 0 whereas sumproduct throws a huff and says no way! I

i think thats what he said :LOL:

SumIf won't ignore an error (#N/A, etc) if it's associated with the criterion.
By the way, the tolerance against errors is not displayed by just SumIf. Try to experiment with CountIf, Match, Vlookup, Hlookup, etc.
 
Upvote 0
It actually disturbs me, i use sumif countif regularly and never realised i might have errors and not be aware......:ROFLMAO: hopefully no one else has noticed! (making mental note to fix errors before boss spots)
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,695
Members
448,979
Latest member
DET4492

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