+ Reply to Thread
Results 1 to 7 of 7

Sumproducts - Multiple Criteria, Single Range

  1. #1
    Registered User
    Join Date
    10-27-2019
    Location
    New York, New York
    MS-Off Ver
    Office 365
    Posts
    3

    Sumproducts - Multiple Criteria, Single Range

    oAlv6uD.jpg


    I need to sum the total amount of deposits for each account number for only deposits that have valid codes. I've tried SUMIFS and SUMPRODUCT, and run into the same problem of setting criteria to a range of values (E2:E6).

    Here is where i'm at from a SUMPRODUCT path:
    =SUMPRODUCT(--($A:$A=$G2),--($C:$C=$E$2:$E$6),$B:$B)

    Is there a way to modify the second sumproduct binary (--) to sum only the range of valid codes?
    Yes, the easy way is the make 5 of them for the 5 codes, i.e. --(C:C=E2), --(C:C=E3), --(C:C=E4), etc... But, the real data set I'm working with has like 100 valid codes so I don't have that luxury.

  2. #2
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: Sumproducts - Multiple Criteria, Single Range

    Hi and welcome.

    Its easier with a copy of your spreadsheet but this might work

    Please Login or Register  to view this content.
    Happy with my advice? Click on the * reputation button below

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

    Re: Sumproducts - Multiple Criteria, Single Range

    H2=IF($G2<>"",SUMPRODUCT((ISNUMBER(MATCH($C$2:$C$100,$E$2:$E$100,0)))*($A$2:$A$100=$G2)*($B$2:$B$100)),"")

    copy down

  4. #4
    Registered User
    Join Date
    10-27-2019
    Location
    New York, New York
    MS-Off Ver
    Office 365
    Posts
    3

    Re: Sumproducts - Multiple Criteria, Single Range

    Thank you! How can I modify this so it only sums negative column B values?
    Last edited by AliGW; 10-28-2019 at 05:40 AM. Reason: Please don't quote unnecessarily!

  5. #5
    Registered User
    Join Date
    10-27-2019
    Location
    New York, New York
    MS-Off Ver
    Office 365
    Posts
    3

    Re: Sumproducts - Multiple Criteria, Single Range

    Quote Originally Posted by Crooza View Post
    Hi and welcome.

    Its easier with a copy of your spreadsheet but this might work

    Please Login or Register  to view this content.

    Do you know how I could only sum values in column B that are <0?

  6. #6
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: Sumproducts - Multiple Criteria, Single Range

    Maybe add --(B:B<0) into the sumproduct
    Last edited by Crooza; 10-28-2019 at 06:20 PM.

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

    Re: Sumproducts - Multiple Criteria, Single Range

    H2=IF($G2<>"",SUMPRODUCT((ISNUMBER(MATCH($C$2:$C$100,$E$2:$E$100,0)))*($A$2:$A$100=$G2)*($B$2:$B$100)*($B$2:$B$100<0)),"")

    copy down

+ 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: 10
    Last Post: 04-18-2019, 10:00 AM
  2. Countifs formula with multiple criteria against a single range
    By GymnasticHippo in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-07-2017, 09:54 PM
  3. Countifs with multiple criteria in single criteria range
    By SUHAS KARHADKAR in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 12-01-2016, 10:55 AM
  4. Countifs with multiple criteria in single criteria range
    By MCP313 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 12-01-2016, 03:51 AM
  5. Sumifs criteria between multiple range in single cells
    By silambarasan.J in forum Excel General
    Replies: 3
    Last Post: 08-18-2015, 05:57 AM
  6. [SOLVED] Count Multiple Criteria in a single Range on a Different Sheet
    By stefanpg in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-18-2012, 04:29 PM
  7. Countifs with multiple criteria in a single range
    By Wolfpackfan320 in forum Excel General
    Replies: 1
    Last Post: 02-27-2012, 04:54 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