Consider the function xyz
As written, this code does not work.
Presumably MaxOpnClo = max(Opn,Clo), ...
Code:
Function xyz(Opn As Range, Clo As Range, Wts As Range)
Dim MaxOpnClo As Range
MaxOpnClo = Application.WorksheetFunction.Max(Opn, Clo)
xyz= Application.WorksheetFunction.SumProduct(MaxOpnClo, Wts) / Application.WorksheetFunction.Sum(Wts)
End Function
As written, this code does not work.
Presumably MaxOpnClo = max(Opn,Clo), ...
Last edited: