Divide by the minimum non-zero number in a range of cells
"Teethless mama" wrote:
=MIN(INDEX(10^10-(A1:A7<0)*(10^10-A1:A7),))
As I noted in my comments about Biff's (T.Valko's) formula, expressions of
this ilk limit MAX(A1:A7) to whatever factor you use, 10^10 in your case.
(Why not simply write 1E10?)
But your expression suffers from the additional limitation that MIN(A1:A7)
cannot be more than about 2^52 less than 1E10 or whatever factor you choose.
Arguably, since the OP is worried about a minimum of zero (sometimes?), you
might think that MIN(A1:A7) cannot be 2^52 less than 1E10. (But is the
operative word "sometimes"?) But considering my first comment, ironically
it behooves you to choose a larger factor, unless the OP gives us an upper
bound.
Much ado about nothing. Personally, I don't feel that any of this is worth
the trouble just to avoid the straight-forward array formula, as much as I
dislike array formulas in general.
---- original message -----
"Teethless mama" wrote in message
...
=MIN(INDEX(10^10-(A1:A7<0)*(10^10-A1:A7),))
Just press ENTER
"Opus" wrote:
I need to find the minimum non-zero number in a range of cells that
contains
some zeroes. So that I can divide by the minimum number. Any ideas?
If I just use the MIN function, it returns a value of 0, then when my
formula divides by that I get the divide by zero error.
|