Reputation: 1
There have been answers previously explaining how to SUM only the first instance. E.g.
=SUMPRODUCT( (A2:A25<>"") / COUNTIF(A2:A25,A2:A25&""),D2:D25)
When looking to only SUM
the values in D on the first instance of a label in A. How would you add a criteria to this formula? i.e. In C the values must equal to "yes"?
Upvotes: 0
Views: 147
Reputation: 152505
Use COUNTIFS with a changing range to see if it is the first then use SUMIFS:
=IF(COUNTIFS($A$1:A2,A2)=1,SUMIFS(D:D,C:C,"yes",A:A,A2),"")
Upvotes: 1
Reputation: 2195
You can use SUMIFS
.
For example: =SUMIFS($D$2:$D$25, $C$2:$C$25, "yes", $A$2:$A$25, "<>"&"")
Upvotes: 0