Search code examples
excelexcel-formulaformula

Pasting the SUM of Negative values through SUMPRODUCT and SUMIFS


I have been using the below formula which SUM the Sheet2 values and Present Them in Sheet3.

Now i have been trying to add one more condition that is the formula should SUM the just Negative Values from the Range Sheet2!D2:D30 When Sheet2 Col"L" cell is not empty and Paste them in Sheet3.

I have attached a Sheet link which may help to solve the problem.

Here is original formula

=SUMPRODUCT(SUMIFS(Sheet2!D2:D30,Sheet2!I2:I30,Sheet1!I2:I30)*(Sheet1!D2:D30=A3))

After i have added one more condition but its not working

=SUMPRODUCT(SUMIFS(Sheet2!D2:D30,Sheet2!I2:I30,Sheet1!I2:I30)*(Sheet1!D2:D30=A3)*(Sheet2!L2:L30<>""))

any help will be much appreciated.

Result will be like this:

enter image description here

Sheet Link

Link


Solution

  • To only sum the negative values, you can just add that as a condition in your SUMIFS:

    =SUMPRODUCT(SUMIFS(Sheet2!D2:D30,Sheet2!D2:D30,"<0",Sheet2!I2:I30,Sheet1!I2:I30)*(Sheet1!D2:D30=A3))