+ Reply to Thread
Results 1 to 5 of 5

Sumproduct-looking up are accurate

  1. #1
    Registered User
    Join Date
    07-25-2006
    Posts
    14

    Sumproduct-looking up are accurate

    Hi,
    I have a formula :
    =SUMPRODUCT((('Totals'!$A$5:$A$11=J5:J11)*('Totals'!$B$5:$M$11)))
    but it only returns the values for J5 J8 and J9, not 6, 7, 10 or 11, as you would expect it to do. I have checked and the values it is looking up are accurate (they work individually). Is this a problem with sumproduct or am I just being a bit dim?

    Thanks

  2. #2
    Franz Verga
    Guest

    re: Sumproduct-looking up are accurate


    "sanders" <[email protected]> ha scritto
    nel messaggio news:[email protected]...
    >
    > Hi,
    > I have a formula :
    > =SUMPRODUCT((('Totals'!$A$5:$A$11=J5:J11)*('Totals'!$B$5:$M$11)))
    > but it only returns the values for J5 J8 and J9, not 6, 7, 10 or 11, as
    > you would expect it to do. I have checked and the values it is looking
    > up are accurate (they work individually). Is this a problem with
    > sumproduct or am I just being a bit dim?
    >
    > Thanks
    >


    Hi Sanders,

    The SUMPRODUCT function needs arrays of the same numbers of elements, but
    you ar multiplying an array of 7 (7 rows * 1 column) elements
    ('Totals'!$A$5:$A$11=J5:J11) by an array of 84 (7 rows * 12 column) elements
    ('Totals'!$B$5:$M$11), so it's right that the result is not what you
    think... You have to fix the two arrray to have the same number of
    elements... Check the on line help.

    --
    Hope I helped you.

    Thanks in advance for your feedback.

    Ciao

    Franz Verga from Italy



  3. #3
    Registered User
    Join Date
    07-25-2006
    Posts
    14
    Thanks for the quick response. I tested out what you suggested and modified the formula to read:
    =SUMPRODUCT((('Totals'!$A$5:$A$11=J5:J11)*('Totals'!$B$5:$B$11)))
    So it is only looking at one column of 7 at a time. But it is still only adding together the corresponding values in the B column for J5, 9, 10 and 11. Any ideas why this would be happening?

    Thanks again



    Quote Originally Posted by Franz Verga
    "sanders" <[email protected]> ha scritto
    nel messaggio news:[email protected]...
    >
    > Hi,
    > I have a formula :
    > =SUMPRODUCT((('Totals'!$A$5:$A$11=J5:J11)*('Totals'!$B$5:$M$11)))
    > but it only returns the values for J5 J8 and J9, not 6, 7, 10 or 11, as
    > you would expect it to do. I have checked and the values it is looking
    > up are accurate (they work individually). Is this a problem with
    > sumproduct or am I just being a bit dim?
    >
    > Thanks
    >


    Hi Sanders,

    The SUMPRODUCT function needs arrays of the same numbers of elements, but
    you ar multiplying an array of 7 (7 rows * 1 column) elements
    ('Totals'!$A$5:$A$11=J5:J11) by an array of 84 (7 rows * 12 column) elements
    ('Totals'!$B$5:$M$11), so it's right that the result is not what you
    think... You have to fix the two arrray to have the same number of
    elements... Check the on line help.

    --
    Hope I helped you.

    Thanks in advance for your feedback.

    Ciao

    Franz Verga from Italy

  4. #4
    Bob Phillips
    Guest

    re: Sumproduct-looking up are accurate

    =SUMPRODUCT((ISNUMBER(MATCH(J5:J11,Totals!$A$5:$A$11,0)))*(Totals!$B$5:$M$11
    ))

    --
    HTH

    Bob Phillips

    (replace somewhere in email address with gmail if mailing direct)

    "sanders" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi,
    > I have a formula :
    > =SUMPRODUCT((('Totals'!$A$5:$A$11=J5:J11)*('Totals'!$B$5:$M$11)))
    > but it only returns the values for J5 J8 and J9, not 6, 7, 10 or 11, as
    > you would expect it to do. I have checked and the values it is looking
    > up are accurate (they work individually). Is this a problem with
    > sumproduct or am I just being a bit dim?
    >
    > Thanks
    >
    >
    > --
    > sanders
    > ------------------------------------------------------------------------
    > sanders's Profile:

    http://www.excelforum.com/member.php...o&userid=36745
    > View this thread: http://www.excelforum.com/showthread...hreadid=572127
    >




  5. #5
    Registered User
    Join Date
    07-25-2006
    Posts
    14
    Brilliant! That works a treat. Thanks for all your help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1