+ Reply to Thread
Results 1 to 6 of 6

Multiple Criteria parameters in SUMIFS

  1. #1
    Registered User
    Join Date
    07-29-2009
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    9

    Multiple Criteria parameters in SUMIFS

    I have a below table as below
    A B C
    a aa 1
    a aa 1
    a dd 1
    a aa 1
    b aa 1
    b bb 1
    b aa 1
    b bb 1
    c cc 1
    c bb 1
    c bb 1
    c cc 1
    d cc 1
    d aa 1
    d bb 1
    d cc 1

    When i put the formula


    =SUMPRODUCT(SUMIFS(C1:C16,A1:A16,{"a","b","c"}))

    it returns 12 However when i put


    =SUMPRODUCT(SUMIFS(C1:C16,A1:A16,{"a","b","c"},B1:B16,{"aa","bb"}))

    it returns only 5

    Can one one help me with this. I dont wnat to use multi formula like

    =SUMPRODUCT(SUMIFS(C1:C16,A1:A16,{"a","b","c"},B1:B16,"aa"})) + SUMPRODUCT(SUMIFS(C1:C16,A1:A16,{"a","b","c"},B1:B16,"bb"}))

    I want to achieve this using SUMIFS only

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Multiple Criteria parameters in SUMIFS

    If you have two "array constants" (the {"a","b","c"} and {"aa","bb"} parts) then one needs to be separated by commas and the other by semi-colons (assuming UK settings), e.g.

    =SUMPRODUCT(SUMIFS(C1:C16,A1:A16,{"a","b","c"},B1:B16,{"aa";"bb"}))
    Audere est facere

  3. #3
    Registered User
    Join Date
    07-29-2009
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Multiple Criteria parameters in SUMIFS

    Wow!!! Thank you so much daddylonglegs..

    instead of hardcoding the criteria, can i store it in excel cells and pass that to the formula?

    Also how to do if i have 3rd Criteria. I tried =SUMPRODUCT(SUMIFS(D1:D16,A1:A16,{"a","b","c"},B1:B16,{"aa";"bb";"cc"},C1:C16,{"zz";"yy"}))
    but did not work
    Last edited by haissk; 04-29-2014 at 10:59 AM.

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Multiple Criteria parameters in SUMIFS

    Yes, but similar to before one needs to be a column and one a row, e.g.

    =SUMPRODUCT(SUMIFS(C1:C16,A1:A16,E1:G1,B1:B16,H2:H3))

    If both criteria ranges are columns (or both rows) then you need to TRANSPOSE one like this

    =SUMPRODUCT(SUMIFS(C1:C16,A1:A16,TRANSPOSE(J2:J4),B1:B16,H2:H3))

    ....and when using TRANSPOSE the formula needs to be "array entered", i.e. confirm with CTRL+SHIFT+ENTER

  5. #5
    Registered User
    Join Date
    07-29-2009
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Multiple Criteria parameters in SUMIFS

    Also how to do if i have 3rd Criteria. I tried =SUMPRODUCT(SUMIFS(D1:D16,A1:A16,{"a","b","c"},B1:B16,{"aa";"bb";"cc"},C1:C16,{"zz";"yy"})) but did not work

  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Multiple Criteria parameters in SUMIFS

    Sorry, I didn't see that part - 3rd criteria isn't possible with this setup - for 3 or more switch to SUMPRODUCT with MATCH, e.g.

    =SUMPRODUCT(D1:D16,ISNUMBER(MATCH(A1:A16,{"a","b","c"},0)+MATCH(B1:B16,{"aa","bb","cc"},0)+MATCH(C1:C16,{"zz","yy"},0))+0)

    You can add more criteria within that syntax

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. SumIfs with multiple criteria using VBA
    By newbi004 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 07-04-2013, 10:21 AM
  2. Replies: 2
    Last Post: 01-23-2013, 06:25 AM
  3. Replies: 3
    Last Post: 11-21-2012, 04:57 PM
  4. [SOLVED] SUMIFS and multiple parameters across rows and columns
    By george_k in forum Excel General
    Replies: 4
    Last Post: 11-02-2012, 02:56 PM
  5. Replies: 1
    Last Post: 05-16-2011, 05:00 PM

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