+ Reply to Thread
Results 1 to 8 of 8

SUMIF with 2 conditions.

Hybrid View

  1. #1
    Registered User
    Join Date
    12-02-2007
    Location
    Brno, The Czech Republic
    Posts
    4

    SUMIF with 2 conditions.

    Hi,

    I need to sum the column "M" with these conditions: L:L>=-0.2 and M:M>=0.1.

    In other words, I need to merge these formulae:
    =SUMIF(L:L;">=-0.2";M:M)
    =SUMIF(M:M;">=0.1")

    I've tried all methods recommended, but to no avail. Does anybody have a clue?
    I'm using a Czech version of Excel 2003.

  2. #2
    Forum Contributor
    Join Date
    01-18-2005
    Location
    Auckland New Zealand
    MS-Off Ver
    Office Professional 2007
    Posts
    295

    Try sumproduct

    In a single cell, try:

    =sumproduct((M1:M65536>=0.1)*(L1:L65536>=-0.2)*(M1:M65536))

    not tested
    Sumproduct cannot refer to an entire column

    hth
    Mike

  3. #3
    Registered User
    Join Date
    12-02-2007
    Location
    Brno, The Czech Republic
    Posts
    4

    Thanks for your advice.

    Unfortunatelly, the formula returns the #NUM! error.

    But I figured out it should be something like this (ah):

    {=SUM(IF($L$6:$L$1000>=-0.2;IF($M$6:$M$1000>=0.1;$M$6:$M$1000;0);0))}

    And since it's array formula, it's necessary to press control+shift+enter when finished with writing.

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    =SUMPRODUCT(($L$6:$L$1000>=-0.2)*($M$6:$M$1000>=0.1)*($M$6:$M$1000))

    should work also.

    The reason you got #NUM error is that Sumproduct cannot refer to the entire column....so you can't use A:A nor can you use A1:A65536...but you can say A2:A65536 or A1:A65535
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  5. #5
    Registered User
    Join Date
    12-02-2007
    Location
    Brno, The Czech Republic
    Posts
    4
    The main problem with sumproduct is that it's not supported in my Czech version of Excel, so I got #NAME? error this time . The function probably has a different name or something.

    Nevertheless, the formula with nested functions is working fine.

    Thank you.

  6. #6
    Forum Contributor
    Join Date
    01-18-2005
    Location
    Auckland New Zealand
    MS-Off Ver
    Office Professional 2007
    Posts
    295
    @nbvc - thanks for your correction, will take on board!

    @martinac - pity it's not available, as it's very useful and not even an array formula. Ah well...

    Regards
    Mike

+ 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