View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
Toppers Toppers is offline
external usenet poster
 
Posts: 4,339
Default Finding minum positive from the result of formula

Did you test this ...

=A1-LARGE(B1:E1,COUNTIF(B1:E1,"="&A1))

????

Answer is -1 which not what OP wanted.

It also fails on this sequence of numbers:

5 2 3 4 4

or any sequence where B1 :E1 is not A1


"Harlan Grove" wrote:

"Harlan Grove" wrote...
"haviv" wrote...

....
How do i develop a formula to be able to show the value of (A1-D1) which
is the minimum positive value.


=A1-MAX(B1:E1)


Sorry, didn't read carefully enough. Either the regular formula

=A1-LARGE(B1:E1,COUNTIF(B1:E1,"="&A1))

or the array formula

=A1-MAX(IF(B1:E1<A1,B1:E1))