MIN with zero values in the range

  • Thread starter Thread starter Brenda Rueter
  • Start date Start date
B

Brenda Rueter

How do I get the minimum number in a range EXCLUDING ZEROS? I have a range
and some cells in the range have a zero balance. MIN ordinarily would be
zero, but I want the next smaller number. So far I do not have a clue on
how to get there. TIA!
 
How do I get the minimum number in a range EXCLUDING ZEROS? I have a range
and some cells in the range have a zero balance. MIN ordinarily would be
zero, but I want the next smaller number. So far I do not have a clue on
how to get there. TIA!

Here's one way.

=LARGE(rng,COUNTIF(rng,">0"))

Substitute your range for rng in the formula.

Your description is a bit ambiguous. The above formula will give you the "next
smaller number" than 0.

If you want to "exclude zeros" than implies that some numbers may be less than
zero and you would want include those in the test.

Therefore you would need the formula:


=LARGE(rng,COUNTIF(rng,"<>0"))



--ron
 
Thank you! That worked perfectly!!!

Ron Rosenfeld said:
Here's one way.

=LARGE(rng,COUNTIF(rng,">0"))

Substitute your range for rng in the formula.

Your description is a bit ambiguous. The above formula will give you the "next
smaller number" than 0.

If you want to "exclude zeros" than implies that some numbers may be less than
zero and you would want include those in the test.

Therefore you would need the formula:


=LARGE(rng,COUNTIF(rng,"<>0"))



--ron
 
Ken, I'm afraid I don't follow the "array" part and Ctrl+Shieft+Enter. Can
you elaborate? I also do not understand what the IF statement is doing in
this formula, but I would like to understand it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top