#1   Report Post  
Pete
 
Posts: n/a
Default Sumproduct

When I enter the formula below, the result I get is 0, when it should
be 490

If Cells N5:N9,N22:N26,N39:N43 = A11

THEN SUM

D5:D9,D22:D26,D39:D43

=SUMPRODUCT(--(Sheet1!N5:N9=A11)--(Sheet1!D5:D9),--(Sheet1!N22:N26=A11),--(Sheet1!D22:D26),--(Sheet1!N39:N43=A11),--(Sheet1!D39:D43))

Any ideas?

Pete

  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

=SUMPRODUCT(--(Sheet1!N5:N9=A11),Sheet1!D5:D9)+SUMPRODUCT(--(Sheet1!N22:N26=
A11),Sheet1!D22:D26)+SUMPRODUCT(--(Sheet1!N39:N43=A11),Sheet1!D39:D43)

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Pete" wrote in message
oups.com...
When I enter the formula below, the result I get is 0, when it should
be 490

If Cells N5:N9,N22:N26,N39:N43 = A11

THEN SUM

D5:D9,D22:D26,D39:D43


=SUMPRODUCT(--(Sheet1!N5:N9=A11)--(Sheet1!D5:D9),--(Sheet1!N22:N26=A11),--(S
heet1!D22:D26),--(Sheet1!N39:N43=A11),--(Sheet1!D39:D43))

Any ideas?

Pete



  #3   Report Post  
Kassie
 
Posts: n/a
Default

And also, do you want to sum D22:D26, as you state, or N22:N26, as per your
formula

"Pete" wrote:

When I enter the formula below, the result I get is 0, when it should
be 490

If Cells N5:N9,N22:N26,N39:N43 = A11

THEN SUM

D5:D9,D22:D26,D39:D43

=SUMPRODUCT(--(Sheet1!N5:N9=A11)--(Sheet1!D5:D9),--(Sheet1!N22:N26=A11),--(Sheet1!D22:D26),--(Sheet1!N39:N43=A11),--(Sheet1!D39:D43))

Any ideas?

Pete


  #4   Report Post  
bj
 
Posts: n/a
Default

try
=SUMPRODUCT(--(Sheet1!N5:N9=A11)*(Sheet1!D5:D9),--(Sheet1!N22:N26=A11)*(Sheet1!D22:D26),--(Sheet1!N39:N43=A11)*(Sheet1!D39:D43))

I am surprised you got zero for an answer, I am not surprised you did not
get the right answer.
in sumproduct each array separated by a "," is multiplied together
as such in your equation the first number would have been
[(1 or 0)+D5]*(1or0)*D22*(1 or 0)*D39 other combos similar.
most patterns would have given some value other than zero for a total of all
the combinations.

Please check if your D column actually has numbers and not numbers in text
format

if you just do = dum(D5:D9) what do you get?
"Pete" wrote:

When I enter the formula below, the result I get is 0, when it should
be 490

If Cells N5:N9,N22:N26,N39:N43 = A11

THEN SUM

D5:D9,D22:D26,D39:D43

=SUMPRODUCT(--(Sheet1!N5:N9=A11)--(Sheet1!D5:D9),--(Sheet1!N22:N26=A11),--(Sheet1!D22:D26),--(Sheet1!N39:N43=A11),--(Sheet1!D39:D43))

Any ideas?

Pete


  #5   Report Post  
Pete
 
Posts: n/a
Default

I've achieved what I need with SUMIF, but thanks anyway.

Pete



  #6   Report Post  
Aladin Akyurek
 
Posts: n/a
Default

Pete wrote:
When I enter the formula below, the result I get is 0, when it should
be 490

If Cells N5:N9,N22:N26,N39:N43 = A11

THEN SUM

D5:D9,D22:D26,D39:D43

=SUMPRODUCT(--(Sheet1!N5:N9=A11)--(Sheet1!D5:D9),--(Sheet1!N22:N26=A11),--(Sheet1!D22:D26),--(Sheet1!N39:N43=A11),--(Sheet1!D39:D43))

Any ideas?

Pete


=SUM(SUMIF(Sheet1!$N$5:$N$9,A11,Sheet1!$D$5:$D$9),
SUMIF(Sheet1!$N$22:$N$26,A11,Sheet1!$D$22:$D$26),
SUMIF(Sheet1!$N$39:$N$43,A11,Sheet1!$D$39:$D$43))
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 Peter B Excel Worksheet Functions 1 March 7th 05 01:59 PM
sumproduct causing memory errors? dave Excel Worksheet Functions 1 March 3rd 05 09:31 AM
Can I reference =, <, or > sign in SUMPRODUCT BobT Excel Discussion (Misc queries) 7 February 16th 05 01:58 PM
Sumproduct function not working Scott Summerlin Excel Worksheet Functions 12 December 4th 04 05:15 AM
adding two sumproduct formulas together ski2004_2005 Excel Worksheet Functions 1 November 12th 04 09:08 PM


All times are GMT +1. The time now is 08:46 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"