WisdomSeeker
01-13-2016, 06:55 PM
I need to write an Excel formula that will sum the values in Column A, but only the values on rows where the sum of Column B + Column C + Column D is greater than zero. That is, my criterion involves multiple columns. I'm looking for a way to do this without a macro, and without having to create an additional column in my data which itself sums Column B + Column C + Column D.
I can't find how to get SUMIF, SUMIFS, or SUMPRODUCT to do this.
With SUMIF it seems my criterion can only be one column, or else my sum_range gets messed up.
With SUMIFS I only seem to be able to have one column involved in each criterion, not add columns together to form a criterion. And multiple criteria are processed as AND, not OR. So I can only get it to include rows that have Column B > 0, Column C > 0, AND Column D > 0.
With SUMPRODUCT I'm trying:
=SUMPRODUCT(((B2:B6>0)+(C2:C6>0)+(D2:D6>0))*A2:A6)
But this adds the same row multiple times if it has a positive value in more than one of the columns, B, C, D.
Any way to get this to work? Perhaps an array formula?
Also, once I get this working I want to add an additional criterion that must also be true: Column E must be blank, after having TRIM applied to its value (LEN(TRIM([value]) <= 0).
Thank you.
I can't find how to get SUMIF, SUMIFS, or SUMPRODUCT to do this.
With SUMIF it seems my criterion can only be one column, or else my sum_range gets messed up.
With SUMIFS I only seem to be able to have one column involved in each criterion, not add columns together to form a criterion. And multiple criteria are processed as AND, not OR. So I can only get it to include rows that have Column B > 0, Column C > 0, AND Column D > 0.
With SUMPRODUCT I'm trying:
=SUMPRODUCT(((B2:B6>0)+(C2:C6>0)+(D2:D6>0))*A2:A6)
But this adds the same row multiple times if it has a positive value in more than one of the columns, B, C, D.
Any way to get this to work? Perhaps an array formula?
Also, once I get this working I want to add an additional criterion that must also be true: Column E must be blank, after having TRIM applied to its value (LEN(TRIM([value]) <= 0).
Thank you.