+ Reply to Thread
Results 1 to 9 of 9

Sumproduct.................

  1. #1
    Registered User
    Join Date
    06-27-2005
    Location
    Christchurch, NZ
    Posts
    87

    Sumproduct.................

    I have a problem surrounding sumproduct and setting criteria.

    I need to sumproduct based on row criteria '19:19'. The value for the row criteria is set in an other cell 'E23'.

    So sum of row 9 and row 17 where 19 is equal to E23.


    =SUMPRODUCT((OFFSET(A9,,MATCH(E23,19:19,0)-1,(OFFSET(A17,,MATCH(E23,19:19,0)+1)/1))))


    Any help greatly appreciated

  2. #2
    Biff
    Guest

    Re: Sumproduct.................

    Hi!

    Try this:

    =SUM(OFFSET(A9,,MATCH(E23,19:19,0)-1),OFFSET(A17,,MATCH(E23,19:19,0)-1))

    Biff

    "Kstalker" <Kstalker.1v2myf_1126235125.0089@excelforum-nospam.com> wrote in
    message news:Kstalker.1v2myf_1126235125.0089@excelforum-nospam.com...
    >
    > I have a problem surrounding sumproduct and setting criteria.
    >
    > I need to sumproduct based on row criteria '19:19'. The value for the
    > row criteria is set in an other cell 'E23'.
    >
    > So sum of row 9 and row 17 where 19 is equal to E23.
    >
    >
    > =SUMPRODUCT((OFFSET(A9,,MATCH(E23,19:19,0)-1,(OFFSET(A17,,MATCH(E23,19:19,0)+1)/1))))
    >
    >
    > Any help greatly appreciated
    >
    >
    > --
    > Kstalker
    > ------------------------------------------------------------------------
    > Kstalker's Profile:
    > http://www.excelforum.com/member.php...o&userid=24699
    > View this thread: http://www.excelforum.com/showthread...hreadid=466133
    >




  3. #3
    Registered User
    Join Date
    06-27-2005
    Location
    Christchurch, NZ
    Posts
    87
    Cheers Biff.

    I do not appear to be getting the correct answer using this. I think that it is not picking up all the instances that match the criteria in E23..... So I am not getting the correct answer...

    Kristan

  4. #4
    Arvi Laanemets
    Guest

    Re: Sumproduct.................

    Hi

    SUMPRODUCT doesn't work with entire rows or columns - you must have all
    ranges to be determined, or even better - use dynamic named ranges. NB! in
    SUMPRODUCT, all ranges MUST be of same dimension.


    --
    Arvi Laanemets
    ( My real mail address: arvil<at>tarkon.ee )



    "Kstalker" <Kstalker.1v2myf_1126235125.0089@excelforum-nospam.com> wrote in
    message news:Kstalker.1v2myf_1126235125.0089@excelforum-nospam.com...
    >
    > I have a problem surrounding sumproduct and setting criteria.
    >
    > I need to sumproduct based on row criteria '19:19'. The value for the
    > row criteria is set in an other cell 'E23'.
    >
    > So sum of row 9 and row 17 where 19 is equal to E23.
    >
    >
    > =SUMPRODUCT((OFFSET(A9,,MATCH(E23,19:19,0)-1,(OFFSET(A17,,MATCH(E23,19:19,0)+1)/1))))
    >
    >
    > Any help greatly appreciated
    >
    >
    > --
    > Kstalker
    > ------------------------------------------------------------------------
    > Kstalker's Profile:
    > http://www.excelforum.com/member.php...o&userid=24699
    > View this thread: http://www.excelforum.com/showthread...hreadid=466133
    >




  5. #5
    Biff
    Guest

    Re: Sumproduct.................

    Hi!

    Perhaps a better explanation of what you are trying to do is needed. Try to
    be VERY SPECIFIC.

    What is the value in E23?

    Biff

    "Kstalker" <Kstalker.1v2sig_1126242329.3548@excelforum-nospam.com> wrote in
    message news:Kstalker.1v2sig_1126242329.3548@excelforum-nospam.com...
    >
    > Cheers Biff.
    >
    > I do not appear to be getting the correct answer using this. I think
    > that it is not picking up all the instances that match the criteria in
    > E23..... So I am not getting the correct answer...
    >
    > Kristan
    >
    >
    > --
    > Kstalker
    > ------------------------------------------------------------------------
    > Kstalker's Profile:
    > http://www.excelforum.com/member.php...o&userid=24699
    > View this thread: http://www.excelforum.com/showthread...hreadid=466133
    >




  6. #6
    Biff
    Guest

    Re: Sumproduct.................

    >SUMPRODUCT doesn't work with entire rows

    =SUMPRODUCT(--(2:2="X"),1:1)

    Of course, Sumif would be a better choice.

    Biff

    "Arvi Laanemets" <garbage@hot.ee> wrote in message
    news:OL$9ZxPtFHA.1172@TK2MSFTNGP11.phx.gbl...
    > Hi
    >
    > SUMPRODUCT doesn't work with entire rows or columns - you must have all
    > ranges to be determined, or even better - use dynamic named ranges. NB! in
    > SUMPRODUCT, all ranges MUST be of same dimension.
    >
    >
    > --
    > Arvi Laanemets
    > ( My real mail address: arvil<at>tarkon.ee )
    >
    >
    >
    > "Kstalker" <Kstalker.1v2myf_1126235125.0089@excelforum-nospam.com> wrote
    > in message news:Kstalker.1v2myf_1126235125.0089@excelforum-nospam.com...
    >>
    >> I have a problem surrounding sumproduct and setting criteria.
    >>
    >> I need to sumproduct based on row criteria '19:19'. The value for the
    >> row criteria is set in an other cell 'E23'.
    >>
    >> So sum of row 9 and row 17 where 19 is equal to E23.
    >>
    >>
    >> =SUMPRODUCT((OFFSET(A9,,MATCH(E23,19:19,0)-1,(OFFSET(A17,,MATCH(E23,19:19,0)+1)/1))))
    >>
    >>
    >> Any help greatly appreciated
    >>
    >>
    >> --
    >> Kstalker
    >> ------------------------------------------------------------------------
    >> Kstalker's Profile:
    >> http://www.excelforum.com/member.php...o&userid=24699
    >> View this thread:
    >> http://www.excelforum.com/showthread...hreadid=466133
    >>

    >
    >




  7. #7
    Registered User
    Join Date
    06-27-2005
    Location
    Christchurch, NZ
    Posts
    87
    Biff.

    Basically the 'B9' reference sets the condition that needs to be met in row 6. So where row 6 = cell B9 then I need to sumproduct rows 2 and 4. So the answer I believe should be 7*9+8*8+9*7 = 190. However I cannot get this to work based on setting criteria.


    A B C D E F
    1 12 2 5 6 5 9
    2 2 5 7 8 9 11
    3 8 8 5 4 7 6
    4 3 2 9 8 7 5
    5
    6 0 0 2 2 2 0
    7
    8
    9 2


    Thanks

    Kristan

  8. #8
    Domenic
    Guest

    Re: Sumproduct.................

    Try...

    =SUMPRODUCT(--(A6:F6=H1),A2:F2,A4:F4)

    ....where H1 contains your criterion.

    Hope this helps!

    In article <Kstalker.1v7t2d_1126476326.1962@excelforum-nospam.com>,
    Kstalker <Kstalker.1v7t2d_1126476326.1962@excelforum-nospam.com>
    wrote:

    > Biff.
    >
    > Basically the 'B9' reference sets the condition that needs to be met in
    > row 6. So where row 6 = cell B9 then I need to sumproduct rows 2 and 4.
    > So the answer I believe should be 7*9+8*8+9*7 = 190. However I cannot
    > get this to work based on setting criteria.
    >
    >
    > A B C D E F
    > 1 12 2 5 6 5 9
    > 2 2 5 7 8 9 11
    > 3 8 8 5 4 7 6
    > 4 3 2 9 8 7 5
    > 5
    > 6 0 0 2 2 2 0
    > 7
    > 8
    > 9 2
    >
    >
    > Thanks
    >
    > Kristan


  9. #9
    Registered User
    Join Date
    06-27-2005
    Location
    Christchurch, NZ
    Posts
    87

    Thumbs up

    Excellent, works perfectly thanks Domenic.

    Thanks for the input Biff.

    Regards

    Kristan

+ 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