View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
joeu2004 joeu2004 is offline
external usenet poster
 
Posts: 2,059
Default Divide by the minimum non-zero number in a range of cells

"Shane Devenshire" wrote:
If you don't want an array formula try this
=SUMPRODUCT((A1:A7<0)*(MIN(A1:A7)=A1:A7)*A1:A7)


Doesn't work for me. Test with A1:A7 = {0,3,3,2,3,3,0}. Returns zero. It
is easy to see why: MIN(A1:A7) is a constant, namely the smallest in the
range. Since that would be zero, the very case that the OP wants to
exclude, the SUMPRODUCT should always be zero.


----- original message -----

"Shane Devenshire" wrote in
message ...
Hi,

If you don't want an array formula try this

=SUMPRODUCT((A1:A7<0)*(MIN(A1:A7)=A1:A7)*A1:A7)

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"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.