+ Reply to Thread
Results 1 to 8 of 8

Summation with 2 different conditions - SUMPRODUCT Can't work in this example

  1. #1
    Forum Contributor
    Join Date
    07-29-2005
    Location
    Singapore
    MS-Off Ver
    2007
    Posts
    253

    Question Summation with 2 different conditions - SUMPRODUCT Can't work in this example

    Hi,

    Sorry, I left out one important condition which resulted in the closure of the last thread.

    I had a solution to count with 2 conditions but I can't do the following summation with 2 conditions.

    Example:
    A1 = Apple
    A2 = Pear
    A3 = Orange
    A4 = Starfruit
    A5 = Apple
    A6= Apple

    C1 = 1
    C2 = 2
    C3 = 3
    C4 = 4
    C5 = 5
    C6= 6

    D1 = SUM any value that is greater than 2 that belongs to "Apple" row, = C5+C6 = 11

  2. #2
    Forum Contributor
    Join Date
    02-14-2010
    Location
    oman
    MS-Off Ver
    Excel 2003
    Posts
    384

    Re: Summation with 2 different conditions - SUMPRODUCT Can't work in this example

    hey man why are u asking again & again same question.have u try below post formulas ???
    http://www.excelforum.com/excel-gene...onditions.html

  3. #3
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile Re: Summation with 2 different conditions - SUMPRODUCT Can't work in this example

    Good afternoon

    What have you got against SUMPRODUCT?
    Something like this should work fine :

    =SUMPRODUCT(--(A1:A6="Apple"),--(C1:C6>2),(C1:C6))

    HTH

    DominicB
    Please familiarise yourself with the rules before posting. You can find them here.

  4. #4
    Forum Contributor
    Join Date
    07-29-2005
    Location
    Singapore
    MS-Off Ver
    2007
    Posts
    253

    Re: Summation with 2 different conditions - SUMPRODUCT Can't work in this example

    Quote Originally Posted by johncena View Post
    hey man why are u asking again & again same question.have u try below post formulas ???
    http://www.excelforum.com/excel-gene...onditions.html
    Hi,

    yes I did try but =SUMPRODUCT((A1:A6="Apple")*(B1:B6>0)) only counted the apples.
    Now it's summation of another column and the summation is only done if it is greater than 2, thus C1's value is left out.

    I tried =SUMIF(A1:A6,"Apple",(AA10:AA73)>2) but excel pops out error message.

  5. #5
    Forum Contributor
    Join Date
    07-29-2005
    Location
    Singapore
    MS-Off Ver
    2007
    Posts
    253

    Question Re: Summation with 2 different conditions - SUMPRODUCT Can't work in this example

    Quote Originally Posted by dominicb View Post
    Good afternoon

    What have you got against SUMPRODUCT?
    Something like this should work fine :

    =SUMPRODUCT(--(A1:A6="Apple"),--(C1:C6>2),(C1:C6))

    HTH

    DominicB
    Hi Dominic! You are my saviour!!!
    I didn't read about the -- in help. Where can I read more about using SUMPRODUCT? What does "--" mean?

  6. #6
    Forum Expert contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2013
    Posts
    1,430

    Re: Summation with 2 different conditions - SUMPRODUCT Can't work in this example

    Люди, питающие благие намерения, как раз и становятся чудовищами.

    Regards, ?Born in USSR?
    Vusal M Dadashev

    Baku, Azerbaijan

  7. #7
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile Re: Summation with 2 different conditions - SUMPRODUCT Can't work in this example

    Hi Lewis Koh

    contaminated's link is a great start to the dark and mysterious world of SUMPRODUCT, but it is quite in depth. I attempted to put the way the unary minus (as the double minus is correctly termed) works to Valued Forum Contributor corinereyes as simply as possible in post 9 of this thread.

    HTH

    DominicB

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Summation with 2 different conditions - SUMPRODUCT Can't work in this example

    the unary minus (as the double minus is correctly termed)
    The double minus is actually two unary negation operators. It's Excels highest-priority arithmetic operator, which drives mathematicians who think =-4^2 should be -16 (i.e., -1 * 4^2) instead of 16 (what Excel returns, (-4)^2)) crazy.
    Last edited by shg; 04-18-2010 at 08:08 PM.
    Entia non sunt multiplicanda sine necessitate

+ 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