Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

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.

share|improve this question
1  
Can you share a doc with us? –  Jacob Jan Tuinstra Feb 4 '13 at 18:20
add comment

1 Answer

I believe this is what you're looking for:

=ARRAYFORMULA(min(if(B2:B6=5,A2:A6)))
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.