SUMIFS function returns Zero value

后端 未结 1 876
深忆病人
深忆病人 2021-01-24 21:29

The SUMIFS function return zero value since one of the parameters do not exist for a specific value.

How can I modify the function so when it will not encounter one of t

相关标签:
1条回答
  • 2021-01-24 22:08

    At first glance, that SUMIFS formula will never produce anything but zero unless Sheet3!H1 and Sheet3!H2 are the same value. If they are different then the value in 'GL Account Details'!A:A cannot be both at the same time; since you can never make a match, you never get anything but zero.

    You can introduce an OR statement into the SUMIFS function by wrapping it in a SUMPRODUCT function.

    =SUMPRODUCT(SUMIFS('GL Account Details'!$AB:$AB,
                       'GL Account Details'!$A:$A, Sheet3!$H$1:$H$2,
                       'GL Account Details'!$N:$N, Sheet3!A4))
    

          

    Alternately, you can simply add two SUMIFS together.

    =SUM(SUMIFS('GL Account Details'!$AB:$AB,
                'GL Account Details'!$A:$A, Sheet3!$H$1,
                'GL Account Details'!$N:$N, Sheet3!A4)),
         SUMIFS('GL Account Details'!$AB:$AB,
                'GL Account Details'!$A:$A, Sheet3!$H$2))
    
    0 讨论(0)
提交回复
热议问题