Reputation: 375
In the above example, using sumifs, the sum of D comes as 0. But since there is no value for D, the result should be blank.
Using this formula does not help.
=SUMIFS($B$2:$B$12,$B$2:$B$12,"<>",$A$2:$A$12,D3)
Any suggestions anyone?
Upvotes: 2
Views: 707
Reputation: 11978
Try:
=IF(COUNTIF($A$2:$A$12;D2)=COUNTIFS($A$2:$A$12;D2;$B$2:$B$12;"");"";SUMIFS($B$2:$B$12;$A$2:$A$12;D2))
With commas:
=IF(COUNTIF($A$2:$A$12,D2)=COUNTIFS($A$2:$A$12,D2,$B$2:$B$12,""),"",SUMIFS($B$2:$B$12,$A$2:$A$12,D2))
Upvotes: 1
Reputation: 13024
If you have EXCEL 365 you can use the FILTER function:
=IFERROR(SUM(FILTER(tblData[count],(tblData[stat]=D3)*(tblData[count]<>""),"")),"no values")
Upvotes: 1