Here's a way to find the minimum value in a range of cells, after excluding zero
Code:Dim rng as range Set rng = Range("SomeRangeWhichAlsoHasZeroesInIt") dbl = Evaluate("MIN(IF(" & rng.Address & "=0,""""," & rng.Address & "))")
Here's a way to find the minimum value in a range of cells, after excluding zero
Code:Dim rng as range Set rng = Range("SomeRangeWhichAlsoHasZeroesInIt") dbl = Evaluate("MIN(IF(" & rng.Address & "=0,""""," & rng.Address & "))")
It could also be written as
Code:dbl = Evaluate("MIN(IF(" & rng.Address & "<>0," & rng.Address & "))")
Cheers !
Excel Range to BBCode Table
Use Social Networking Tools If You Like the Answers !
Message to Cross Posters
@ Home - Office 2010/2013/2016 on Win 10 (64 bit); @ Work - Office 2016 on Win 10 (64 bit)
Would that not exclude all negative numbers as well as zero?
can you use
<>0
xl2007 - Windows 7
xl hates the 255 number
Cheers !
Excel Range to BBCode Table
Use Social Networking Tools If You Like the Answers !
Message to Cross Posters
@ Home - Office 2010/2013/2016 on Win 10 (64 bit); @ Work - Office 2016 on Win 10 (64 bit)
Bookmarks