View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_5_] Bob Phillips[_5_] is offline
external usenet poster
 
Posts: 620
Default Counting for Minimum Difference Value

Michael,

How about

=MIN(ABS(A1:D1-B1:E1))

as an array formula, entered with Ctrl-Shift-Enter.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Michael168" wrote in message
...
e.g. In a worksheet,

Cells

A1=5
B1=3
C1=4
D1=8
E1=1

In G1 for min difference of sum in the range = C1-B1 = 1
In H1 for max difference of sum in the range = D1-E1 = 7

For maximum difference, the max formula can be used but what about the
minimun difference because the min formula cannot give the correct
answer.

How to do this in the range (A1:E1)? Cells value in the are
changing constantly.

Can someone help me?

Thank you.



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/