+ Reply to Thread
Results 1 to 5 of 5

Sum if 2 conditions hold true

  1. #1
    Registered User
    Join Date
    06-01-2012
    Location
    Hong Kong
    MS-Off Ver
    Excel 2011 (Mac)
    Posts
    13

    Sum if 2 conditions hold true

    Hi there,

    I am trying to find a way to get the sum of values if 2 conditions hold true.


    Spreadsheet dimensions: A9-C3000

    1st condition: Value in Column B is "GG1"
    2nd condition: Value in Column C is lager then six and smaller or equal to 9.

    For all events where this holds true, sum up the values in column C.

    Thanks for you help

  2. #2
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: Sum if 2 conditions hold true

    see if this works for you.

    =sumproduct((c9:c3000)*(b9:b3000="gg1")*(c9:c3000>6)*(c9:c3000<=9))

    or

    =sumifs(c9:c3000,b9:b3000,"gg1",c9:c3000,">"&6,c9:c3000,"<="&9)
    Last edited by icestationzbra; 06-21-2012 at 11:28 PM.
    - i.s.z -
    CSE, aka Array aka { }, formulae are confirmed with CONTROL+SHIFT+ENTER.
    Replace commas ( , ) with semicolons ( ; ) in formulae, if your locale setting demands.
    All good ideas are courtesy resources from this forum as well as others around the web.
    - e.o.m -

  3. #3
    Registered User
    Join Date
    06-01-2012
    Location
    Hong Kong
    MS-Off Ver
    Excel 2011 (Mac)
    Posts
    13

    Re: Sum if 2 conditions hold true

    Thanks, but I get a #value error.

    Could the reason be that in some of the cells in column C I have text. However, text is only on "non GG1" rows in column C. Any idea?

  4. #4
    Registered User
    Join Date
    06-01-2012
    Location
    Hong Kong
    MS-Off Ver
    Excel 2011 (Mac)
    Posts
    13

    Re: Sum if 2 conditions hold true

    I think I found a solution!

    =SUMPRODUCT((C3:C15),--(B3:B15="gg1"),--(C3:C15>6),--(C3:C15<=9))

    thanks

  5. #5
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: Sum if 2 conditions hold true

    SUMFIS would work around such datatype issues without the need for such coercion...
    Last edited by icestationzbra; 06-22-2012 at 10:20 AM.

+ 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