Sumproduct and min/max

M

Matt T-Tine

I've recently learned many uses for sumproduct, but what I really need
it to do is to find the min, max, and median from column C where column
b="x" and column a="y"

Any thoughts?
 
D

Dave Peterson

=MIN(IF((A1:A10="x")*(B1:B10="y"),C1:C10))
=MAX(IF((A1:A10="x")*(B1:B10="y"),C1:C10))
=MEDIAN(IF((A1:A10="x")*(B1:B10="y"),C1:C10))

(adjust your range and make each the same number of rows)

But hit ctrl-shift-enter instead of just enter. If you do it correctly, excel
will wrap curly brackets {} around your formula. (don't type them yourself.)
 
Top