Shane Devenshire said:
=SUMPRODUCT(MIN(9^9*(A1:A8=0)+A1:A8))
Why 9^9? Why not something more straight-forward like 10^10? That can
written as the constant 1E10?
And why is this any better than Biff's (T.Valko's) formulation that uses
MIN(INDEX(...))? I presume you saw his, since you posted your follow-up
more than 4 hours later to the same news server, I believe.
In any case, as I noted regarding Biff's formula, expressions of this ilk
limit MAX(A1:A8) to whatever factor you use, be it 9^9, 1E10 or 1E100. So
it would behoove you to use a larger factor like 1E10 or even 1E100.
And to that end, I think it would be better to replace any constant factor
(e.g. 9^9) with 2*max(A1:A8). That limits MAX(A1:A8) to 2^1023, about half
the biggest value allowed.
I also noted that we can extend the range of values for MAX(A1:A8) by
replacing the factor 2 with a smaller factor larger than 1; the smallest
constant factor is 1.00000000000001.
But none of this seems to be worth the trouble just to avoid the
straight-forward array formula solution, as much as I don't like array
formulas myself.
----- original message -----