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.
|