+ Reply to Thread
Results 1 to 6 of 6

Sum if multiple criteria

  1. #1
    Registered User
    Join Date
    06-17-2020
    Location
    Canada
    MS-Off Ver
    2019
    Posts
    22

    Exclamation Sum if multiple criteria

    IN the worksheet attached, i'm trying to come up with a formula that sum the data in columns A:D if certain conditions are met

    In the highlighted yellow cell (H2), i'm trying to SUM anything that has the following criteria:
    - Affinity in column A
    - "Like itLike it" OR "Love itLove it" in Column B
    - Belongs to Test

    So for example, the final value in H2 should be 132+126.

    please help!
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    MS 365 Subscription Insider (Windows 10)
    Posts
    49,480

    Re: Sum if multiple criteria

    For test:

    =SUM(SUMIFS(C2:C89,A2:A89,G2,B2:B89,{"Like itLike it";"Love itLove it"}))

    For control:

    =SUM(SUMIFS(D2:D89,A2:A89,G2,B2:B89,{"Like itLike it";"Love itLove it"}))
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!

    Forum Rules (updated September 2018): please read them here.
    How to use the Power Query code you've been given: help here. More about the Power suite here.
    Don't forget to say "thank you" to those who have helped you in your thread. If you wish, you can also reward them by clicking on their reputation star bottom left.

  3. #3
    Registered User
    Join Date
    06-17-2020
    Location
    Canada
    MS-Off Ver
    2019
    Posts
    22

    Re: Sum if multiple criteria

    Thanks! by any chance would this formula change if charts A:D were pivot tables? I'm trying to use the formula in Google Sheets and for some reason it's not summing up Like it AND Love it—it's only showing one or the other

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    MS 365 Subscription Insider (Windows 10)
    Posts
    49,480

    Re: Sum if multiple criteria

    You posted in the wrong section if this is for GoogleSheets - shall I move your thread?

  5. #5
    Valued Forum Contributor wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Malaysia
    MS-Off Ver
    2007/MSO365
    Posts
    857

    Re: Sum if multiple criteria

    In response to question #1, the formula is an array. Since there are spaces in the cell text of the attachments C1 and D1, the formula can be copied and pasted down and pasted on the right.
    Formula is
    HTML Code: 
    {=SUM(SUMIFS(OFFSET($C:$C,,MATCH(H$1,$C$1:$D$1,)-1),$A:$A,$G2,$B:$B,{"Like itLike it";"Love itLove it"}))}

  6. #6
    Valued Forum Contributor
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,035

    Re: Sum if multiple criteria

    H2=IF($G2<>"",SUMPRODUCT((ISNUMBER(MATCH($B$2:$B$100,$B$4:$B$5,0)))*($C$2:$D$100)*($C$1:$D$1=H$1)*($A$2:$A$100=$G2)),"")

    Copy across and down
    Attached Files Attached Files

+ 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. Replies: 1
    Last Post: 03-25-2020, 08:06 AM
  2. [SOLVED] Lookup multiple criteria in multiple columns in multiple rows; return true if exists
    By ufdlim in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-07-2019, 02:03 PM
  3. Replies: 9
    Last Post: 07-23-2015, 01:21 PM
  4. Replies: 2
    Last Post: 05-26-2015, 07:29 PM
  5. [SOLVED] countifs statement with multiple criteria for multiple criteria ranges
    By mcdermott2 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-07-2015, 11:48 AM
  6. [SOLVED] UDF for sum of multiple criteria in multiple columns and single criteria in multiple colum
    By Ganesh7299 in forum Excel Programming / VBA / Macros
    Replies: 32
    Last Post: 11-22-2013, 04:26 AM
  7. Replies: 2
    Last Post: 10-05-2011, 12:43 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