View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Gabriel[_3_] Gabriel[_3_] is offline
external usenet poster
 
Posts: 17
Default sqr function in vba

Hi,

When I add sqr function to the below myFormula it doesn't work anymore.

So, this works fine:
Function MyFormula(Array1, Array2) As Variant
With Application.WorksheetFunction
MyFormula = .MMult(.Transpose(Array1), .MMult(Array2, Array1))
End With
End Function

This doesn't work
MyFormula = Sqr(.MMult(.Transpose(Array1), .MMult(Array2, Array1)))

Does anyone know what am I missing here?

Much obliged
Gabriel