Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35
Default Why an error on Sumproduct?

Hi Team,

was wondering if you could shed some light on this for me.

I have these 3 columns... A , E and P
I use these countif statements to try and set up my Sumproduct....

=COUNTIF($E$2:$E$4000,"MST CSD") --results in a count of 405
=COUNTIF($A$2:$A$4000,V27) --results in a count of 33

Column P has an integer ranging from 1 - 40

I want to add colum P if E="MST CSD" and A = 18 (the value in V27)

so I use

=SUMPRODUCT(($E$2:$E$4000="MST CSD")*($A$2:$A$4000=V27),($P$2:$P$4000))

But this results in an #N/A

I know by using the Data filter that there are 8 occurances that meet the
conditions and should be adding together to give a result of 141

any ideas of what I have done wrong?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Why an error on Sumproduct?

=SUMPRODUCT(($E$2:$E$4000="MST CSD")*($A$2:$A$4000=V27),($P$2:$P$4000))

Your formula should work but a "cleaner" way to write it would be:

=SUMPRODUCT(--($A$2:$A$4000=V27),--($E$2:$E$4000="MST CSD"),$P$2:$P$4000)

As far as the #N/A error, do you have any #N/A errors in any of the ranges?


--
Biff
Microsoft Excel MVP


"Madduck" wrote in message
...
Hi Team,

was wondering if you could shed some light on this for me.

I have these 3 columns... A , E and P
I use these countif statements to try and set up my Sumproduct....

=COUNTIF($E$2:$E$4000,"MST CSD") --results in a count of 405
=COUNTIF($A$2:$A$4000,V27) --results in a count of 33

Column P has an integer ranging from 1 - 40

I want to add colum P if E="MST CSD" and A = 18 (the value in V27)

so I use

=SUMPRODUCT(($E$2:$E$4000="MST CSD")*($A$2:$A$4000=V27),($P$2:$P$4000))

But this results in an #N/A

I know by using the Data filter that there are 8 occurances that meet the
conditions and should be adding together to give a result of 141

any ideas of what I have done wrong?



  #3   Report Post  
Posted to microsoft.public.excel.misc
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Why an error on Sumproduct?

works okay for me except when there is #N/A error in the data somewhere.


"Madduck" wrote:

Hi Team,

was wondering if you could shed some light on this for me.

I have these 3 columns... A , E and P
I use these countif statements to try and set up my Sumproduct....

=COUNTIF($E$2:$E$4000,"MST CSD") --results in a count of 405
=COUNTIF($A$2:$A$4000,V27) --results in a count of 33

Column P has an integer ranging from 1 - 40

I want to add colum P if E="MST CSD" and A = 18 (the value in V27)

so I use

=SUMPRODUCT(($E$2:$E$4000="MST CSD")*($A$2:$A$4000=V27),($P$2:$P$4000))

But this results in an #N/A

I know by using the Data filter that there are 8 occurances that meet the
conditions and should be adding together to give a result of 141

any ideas of what I have done wrong?

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35
Default Why an error on Sumproduct?

Thank you both... there was a sneaky little N/a I missed on checking .<



thanks again ......



"JMB" wrote:

works okay for me except when there is #N/A error in the data somewhere.


"Madduck" wrote:

Hi Team,

was wondering if you could shed some light on this for me.

I have these 3 columns... A , E and P
I use these countif statements to try and set up my Sumproduct....

=COUNTIF($E$2:$E$4000,"MST CSD") --results in a count of 405
=COUNTIF($A$2:$A$4000,V27) --results in a count of 33

Column P has an integer ranging from 1 - 40

I want to add colum P if E="MST CSD" and A = 18 (the value in V27)

so I use

=SUMPRODUCT(($E$2:$E$4000="MST CSD")*($A$2:$A$4000=V27),($P$2:$P$4000))

But this results in an #N/A

I know by using the Data filter that there are 8 occurances that meet the
conditions and should be adding together to give a result of 141

any ideas of what I have done wrong?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SUMPRODUCT #N/A error R Ormerod Excel Discussion (Misc queries) 7 April 14th 07 02:56 AM
Sumproduct value error Brad Excel Worksheet Functions 7 October 31st 06 09:47 PM
Sumproduct error Curtis Excel Worksheet Functions 2 October 29th 06 10:18 PM
SUMPRODUCT ERROR Mestrella31 Excel Discussion (Misc queries) 1 January 26th 05 08:01 PM
Sumproduct #num error Dominique Feteau Excel Worksheet Functions 2 December 19th 04 09:43 PM


All times are GMT +1. The time now is 03:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"