Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
MAX of ABS of 2 values syntax
Would this syntax be correct ?
Var1 = WorksheetFunction.Max(WorksheetFunction.Abs (Rng1),WorksheetFunction.Abs(Rng2)) Thank you for your help, J.P. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
MAX of ABS of 2 values syntax
JP,
If you have only one cell in each range, then use Var1 = Application.WorksheetFunction.Max(Abs(rng1.Value), Abs(rng2.Value)) VBA has its own ABS function, so the worksheetfunction is not needed in that case. HTH, Bernie MS Excel MVP "u473" wrote in message ... Would this syntax be correct ? Var1 = WorksheetFunction.Max(WorksheetFunction.Abs (Rng1),WorksheetFunction.Abs(Rng2)) Thank you for your help, J.P. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
MAX of ABS of 2 values syntax
That won't work, try this
Var1 = Evaluate("MAX(ABS(" & rng1.Address & "),ABS(" & rng2.Address & "))") -- __________________________________ HTH Bob "u473" wrote in message ... Would this syntax be correct ? Var1 = WorksheetFunction.Max(WorksheetFunction.Abs (Rng1),WorksheetFunction.Abs(Rng2)) Thank you for your help, J.P. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
MAX of ABS of 2 values syntax
Thank you both.
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Syntax HELP | Excel Discussion (Misc queries) | |||
Paste Special Values Syntax | Excel Programming | |||
Passing Values Syntax | Excel Programming | |||
paste as values syntax | Excel Programming | |||
VBA Syntax for VLOOKUP to return array of return values | Excel Programming |