Reputation: 387
I've been using the following formula to sum the top 3 values on a given column with some criteria. color
and values
are named ranges.
=SUMPRODUCT(LARGE((color="red")*(values),{1,2,3}))
What I couldn't find an answer for is when I want to sum values when color is red
OR green
.
Is this possible?
Upvotes: 0
Views: 68
Reputation: 166331
One way:
=SUMPRODUCT(LARGE(((color="red")+(color="green"))*(values),{1,2,3}))
Upvotes: 1