Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How can I create a user function that accomplishes this:
=IF(MAX(H2:H35)<ABS(MIN(H2:H35)),MIN(H2:H35),MAX(H 2:H35)) I want this function to let me simply enter =MAXABS(h2:h35) Thanks in advance, Bram Weisma -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The simplest way is to use exactly the same formula ..
Function MAXABS(rng As Range) With WorksheetFunction MAXABS = IIf(.Max(rng) < Abs(.Min(rng)), .Min(rng), .Max(rng)) End With End Function Although it's probably slightly more efficient to avoid calculating the Maximum and Minimum more than once .. Function MAXABS(rng As Range) Dim MaxVal, MinVal MaxVal = WorksheetFunction.Max(rng) MinVal = WorksheetFunction.Min(rng) MAXABS = IIf(MaxVal < Abs(MinVal), MinVal, MaxVal) End Function Enjoy, Tony ----- bramweisman wrote: ----- How can I create a user function that accomplishes this: =IF(MAX(H2:H35)<ABS(MIN(H2:H35)),MIN(H2:H35),MAX(H 2:H35)) I want this function to let me simply enter =MAXABS(h2:h35) Thanks in advance, Bram Weisman --- Message posted from http://www.ExcelForum.com/ |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Maximum Absolute values | Excel Worksheet Functions | |||
how can i change dollar sign to rupee sign in sales invoice | Excel Discussion (Misc queries) | |||
$ sign for absolute reference Explanation | Excel Worksheet Functions | |||
How do I get the maximum absolute value of a range of numbers? | Excel Discussion (Misc queries) | |||
XL invoice replace the dollar sign with euro sign | New Users to Excel |