XL: Returning the Smallest Number Greater Than Zero (60116)



The information in this article applies to:

  • Microsoft Excel 2000
  • Microsoft Excel 2002
  • Microsoft Excel 97 for Windows
  • Microsoft Excel 2001 for Mac
  • Microsoft Excel 98 Macintosh Edition

This article was previously published under Q60116

SUMMARY

The Microsoft Excel MIN function returns the smallest number in a list of arguments. If the smallest number is zero (0), the function returns zero.

To return the smallest number greater than zero, enter the following array formula

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

where A1:A10 represents the range of the numbers. This returns an array of a single value with the smallest positive number.

NOTE: To enter an array formula in Excel for the Macintosh, press COMMAND+RETURN.

Modification Type:MajorLast Reviewed:5/13/2003
Keywords:kbhowto KB60116