+ Reply to Thread
Results 1 to 14 of 14

Excel SUMIFS with multiple AND criterias in same column

  1. #1
    Registered User
    Join Date
    06-09-2013
    Location
    Hong Kong
    MS-Off Ver
    Excel 2016
    Posts
    16

    Excel SUMIFS with multiple AND criterias in same column

    Hi,

    I have a table structure below, and want to calculate the sub-total with the criteria of Server A "AND" Server B" in Subscription 1 (excluding "Server C"), I tried both of the below formula, but it doesn't works. Please can someone help? Thanks a lot.

    L3 = Table Name

    =SUMIFS(INDIRECT(L$3&"[[#All],[Cost]]"),INDIRECT(L$3&"[[#All],[Subscription]]"),"Subscription 1",INDIRECT(L$3&"[[#All],[Server]]"), "Server A", INDIRECT(L$3&"[[#All],[Server]]"), "Server B")

    =SUMIFS(INDIRECT(L$3&"[[#All],[Cost]]"),INDIRECT(L$3&"[[#All],[Subscription]]"),"Subscription 1",INDIRECT(L$3&"[[#All],[Server]]"), {"Server A", "Server B"})


    Subscription Server Cost
    Subscription 1 Server A US 25.4
    Subscription 1 Server A US 13.9
    Subscription 2 Server D US 20.2
    Subscription 1 Server A US 6.7
    Subscription 1 Server B US 33.5
    Subscription 2 Server E US 16.8
    Subscription 1 Server B US 11.4
    Subscription 1 Server C US 27.8

  2. #2
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,935

    Re: Excel SUMIFS with multiple AND criterias in same column

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

  3. #3
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Excel SUMIFS with multiple AND criterias in same column

    try: =SUMIFS($C$2:$C$9,$A$2:$A$9,"Subscription 1",$B$2:$B$9,"Server A")+SUMIFS($C$2:$C$9,$A$2:$A$9,"Subscription 1",$B$2:$B$9,"Server B")

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Excel SUMIFS with multiple AND criterias in same column

    This modification to sandy's formula should work, too.

    =SUMPRODUCT(SUMIFS($C$2:$C$9,$A$2:$A$9,"Subscription 1",$B$2:$B$9,{"Server A","Server B"}))
    Dave

  5. #5
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Excel SUMIFS with multiple AND criterias in same column

    Thanks Dave but I think it will be enough:
    =SUM(SUMIFS($C$2:$C$9,$A$2:$A$9,"Subscription 1",$B$2:$B$9,{"Server A","Server B"}))

  6. #6
    Registered User
    Join Date
    06-09-2013
    Location
    Hong Kong
    MS-Off Ver
    Excel 2016
    Posts
    16

    Re: Excel SUMIFS with multiple AND criterias in same column

    Thanks Ankur Shukla & Sandy.

    @Sandy, any other ways to do as it will be very long since I have around 1x different servers and will add more in the future. I have created a separate table contains "Server A" & "Server B", is that able to utilize in the formula? Thanks.

    Best regards,
    Thomas Lam

  7. #7
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Excel SUMIFS with multiple AND criterias in same column

    @ sandy

    Good point. I hadn't even tried that... I just went right to the "big" guns. LOL

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Excel SUMIFS with multiple AND criterias in same column

    Try this. I put your criteria in their own cells and referenced them, this makes it a bit more dynamic. You could, of course, hard code the names instead.
    A
    B
    C
    D
    E
    1
    Server A
    2
    Subscription Server Cost server B
    3
    Subscription 1 Server A
    25.4
    90.9
    Subscription 1
    4
    Subscription 1 Server A
    13.9
    5
    Subscription 2 Server D
    20.2
    6
    Subscription 1 Server A
    6.7
    7
    Subscription 1 Server B
    33.5
    8
    Subscription 2 Server E
    16.8
    9
    Subscription 1 Server B
    11.4
    10
    Subscription 1 Server C
    27.8

    D3=SUMPRODUCT(--($A$3:$A$10=$E$3),--($B$3:$B$10=$E$1)+($B$3:$B$10=E2),C3:C10)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  9. #9
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Excel SUMIFS with multiple AND criterias in same column

    You can use formula from post #4 or #5, something like:

    =SUM(SUMIFS($C$2:$C$9,$A$2:$A$9,"Subscription 1",$B$2:$B$9,{"Server A","Server B","other1","other2","etc..."}))
    or
    SUMPRODUCT(SUMIFS($C$2:$C$9,$A$2:$A$9,"Subscription 1",$B$2:$B$9,$F$1:$F$10))
    where F1:F10 is a list of servers
    Last edited by sandy666; 05-04-2017 at 01:13 AM. Reason: forgot $$

  10. #10
    Registered User
    Join Date
    06-09-2013
    Location
    Hong Kong
    MS-Off Ver
    Excel 2016
    Posts
    16

    Re: Excel SUMIFS with multiple AND criterias in same column

    BIG Thanks to everyone, and below is perfectly works on my case. Much appreciated. Thanks Sandy.

    SUMPRODUCT(SUMIFS($C$2:$C$9,$A$2:$A$9,"Subscription 1",$B$2:$B$9,$F$1:$F$10))
    where F1:F10 is a list of servers

    Best regards,
    Thomas Lam

  11. #11
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Excel SUMIFS with multiple AND criterias in same column

    Glad to help

    If it works for you read dancing text in my footnote (here or above)

  12. #12
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Excel SUMIFS with multiple AND criterias in same column

    Btw, if there is more Subcriptions you can do the same as for Servers

  13. #13
    Registered User
    Join Date
    06-09-2013
    Location
    Hong Kong
    MS-Off Ver
    Excel 2016
    Posts
    16

    Re: Excel SUMIFS with multiple AND criterias in same column

    Done Sandy

  14. #14
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Excel SUMIFS with multiple AND criterias in same column

    Not yet
    Scroll up, top right corner, Thread Tools, Mark Thread SOLVED

+ 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. [SOLVED] SUMPRODUCT with multiple criterias, multiple search on same column and with wild card
    By dluhut in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-25-2017, 07:17 PM
  2. Sumproduct of multiple column (same row) that meet multiple criterias
    By dirdjo in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-28-2016, 03:57 AM
  3. Sumproduct for ranking with multiple criterias; maybe sumifs?
    By myth_victor in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-09-2015, 10:44 AM
  4. SUMIFS with multiple criterias working slowly
    By JakobL in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-17-2015, 03:17 PM
  5. [SOLVED] Summing value on a column in multiple criterias in multiple sheet
    By radicrains in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-12-2013, 11:51 PM
  6. Sumifs with multiple criterias
    By gnoke in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-21-2012, 05:51 AM
  7. SUMIFS with multiple criterias row/colums
    By btem in forum Excel General
    Replies: 8
    Last Post: 09-22-2011, 11:04 AM

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