+ 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
    27

    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
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,409

    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!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

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

    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
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,409

    Re: Sum if multiple criteria

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

  5. #5
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    China Shanghai
    MS-Off Ver
    365 V2402 and WPS V2022
    Posts
    3,327

    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: 

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

    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