I'm a bit vague as to what I am looking for/asking about, but here is an example:
A | B
22 | 5
15 | 5
2 | 10
19 | 10
5 | 10
=min(A2:A6, if(B2:B6=5, 5)) ==> 15
=min(A2:A6, if(B2:B6=5, 10)) ==> 2
Given a large range (1000+ rows), it only includes in the calculation (which may be min/max/avg) the cells if another cell in the same row contains a particular value.