Using MIN function but eliminating 0's

T

Top_Hat

Version: 2008
Operating System: Mac OS X 10.5 (Leopard)
Processor: Intel

I want to find the minimum number greater then 0 in a column of numbers. Using MIN (=min(a1:a3) in a column with 2, 5, 0 as the data, MIN returns "0" but I want it to return "2" by ignoring the 0's.

Thank you for any help.
 
J

JE McGimpsey

Version: 2008
Operating System: Mac OS X 10.5 (Leopard)
Processor: Intel

I want to find the minimum number greater then 0 in a column of numbers.
Using MIN (=min(a1:a3) in a column with 2, 5, 0 as the data, MIN returns "0"
but I want it to return "2" by ignoring the 0's.

One way (array-entered using CMD-RETURN):

=MIN(IF(A1:A3>0,A1:A3))
 
C

Carl Witthoft

JE McGimpsey said:
One way (array-entered using CMD-RETURN):

=MIN(IF(A1:A3>0,A1:A3))

should be a lot easier: =SMALL(a1:a3,2) ; this will only work if 0 is
the minimum value you ever have in your data set.
 
C

Carl Witthoft

JE McGimpsey said:
One way (array-entered using CMD-RETURN):

=MIN(IF(A1:A3>0,A1:A3))

Sorry --- ignore my post about SMALL. The documentation (at least for
Office2004) is misleading; SMALL doesn't comprehend repeated values.

So, use this:

=SMALL(D9:D19,COUNTIF(D9:D19,0)+1)
 

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

Top