C
Chris Ashley
Does anyone know of a formula which will give the minimum value of a
range (ex. A1:A200) excluding the zeros (0).
range (ex. A1:A200) excluding the zeros (0).
David McRitchie said:The following will return the lowest number whether 0 or negative
and the poster definitely indicated no zeros.
=SMALL(A:A,COUNTIF(A:A,0)+1)
If there are no numbers in the column
the MIN formula returns #NUM!
the SMALL formula returns 0 -- zero
Reminder the MIN formula -- entered as array formula Ctrl+Shift+Enter
=MIN(IF(A1:A200>0,A1:A200))
IF you don't want to see the error you could code use Ctrl+Shift+Enter
=IF(COUNTIF(A1:A200,">0"),MIN(IF(A1:A200>0,A1:A200)),"")
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm
Trevor Shuttleworth said:Another option:
Based on a solution from Gord Dibben, XL MVP -
=SMALL(A:A,COUNTIF(A:A,0)+1)
(NOT Array-entered but I don't think it hurts if it is)
Regards
Trevor
Chris Ashley said:Thanks guys. They both worked. What the heck does this do -- Ctrl+Shift+Enter
I never heard of that before, but it worked. Thanks a bunch.
David McRitchie said:The following will return the lowest number whether 0 or negative
and the poster definitely indicated no zeros.
=SMALL(A:A,COUNTIF(A:A,0)+1)
If there are no numbers in the column
the MIN formula returns #NUM!
the SMALL formula returns 0 -- zero
Reminder the MIN formula -- entered as array formula Ctrl+Shift+Enter
=MIN(IF(A1:A200>0,A1:A200))
IF you don't want to see the error you could code use Ctrl+Shift+Enter
=IF(COUNTIF(A1:A200,">0"),MIN(IF(A1:A200>0,A1:A200)),"")
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm
Trevor Shuttleworth said:Another option:
Based on a solution from Gord Dibben, XL MVP -
=SMALL(A:A,COUNTIF(A:A,0)+1)
(NOT Array-entered but I don't think it hurts if it is)
Regards
Trevor
Does anyone know of a formula which will give the minimum value of a
range (ex. A1:A200) excluding the zeros (0).
If there are no numbers in the column
the MIN formula returns #NUM!
the SMALL formula returns 0 -- zero
David McRitchie said:The following will return the lowest number whether 0 or negative
and the poster definitely indicated no zeros.
=SMALL(A:A,COUNTIF(A:A,0)+1)
If there are no numbers in the column
the MIN formula returns #NUM!
the SMALL formula returns 0 -- zero
Reminder the MIN formula -- entered as array formula Ctrl+Shift+Enter
=MIN(IF(A1:A200>0,A1:A200))
IF you don't want to see the error you could code use Ctrl+Shift+Enter
=IF(COUNTIF(A1:A200,">0"),MIN(IF(A1:A200>0,A1:A200)),"")
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm
Another option:
Based on a solution from Gord Dibben, XL MVP -
=SMALL(A:A,COUNTIF(A:A,0)+1)
(NOT Array-entered but I don't think it hurts if it is)
Regards
Trevor