View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rick Rothstein \(MVP - VB\) Rick Rothstein \(MVP - VB\) is offline
external usenet poster
 
Posts: 2,202
Default get max or min number

Okay, ignore all my other attempts... even though the last modification I
posted will work, there is a much simpler and more straightforward formula
to do what you want. This non-array, normally entered formula should do the
trick...

=IF(ABS(MIN(G81:I81))ABS(MAX(G81:I81)),MIN(G81:I8 1),MAX(G81:I81))

(See what a little rest period can do for the thinking processes.<g)

As with my other formula, this one returns the positive value if there is a
tie in magnitude between the largest negative and positive values.

Rick


"Karish" wrote in message
...
i have these numbers
-3
2
1

i want the maximum absolute number but i want to retain the sign
afterwards.
So i put =MAX(ABS(G81:I81))
but that returns 3 and not -3
how do i tell the formula to also return the correct sign of the maximum
absolute number in a range of numbers?