G
Gabriel
Hi,
In an excel spreadsheet I manage to get the result but I just don`t
get why the VBA function that I`ve created just doesn`t work.
Basically, I have two arrays, the formula below and the result
1
2
3
4 5 6
7 8 9
10 11 12
{=SQRT(MMULT(TRANSPOSE(A1:A3);MMULT(C1:E3;A1:A3)))}=18.33
Then in VBA, it just doesn`t work
Function MyFormula(Array1, Array2) As Variant
With Application.WorksheetFunction
MyFormula = Sqr(.MMult(.Transpose(Array1), .MMult(Array2,
Array1)))
End With
End Function
Why? Why in a spreadsheets it works and in vba it doesn`t?
Thank you
Gabriel
In an excel spreadsheet I manage to get the result but I just don`t
get why the VBA function that I`ve created just doesn`t work.
Basically, I have two arrays, the formula below and the result
1
2
3
4 5 6
7 8 9
10 11 12
{=SQRT(MMULT(TRANSPOSE(A1:A3);MMULT(C1:E3;A1:A3)))}=18.33
Then in VBA, it just doesn`t work
Function MyFormula(Array1, Array2) As Variant
With Application.WorksheetFunction
MyFormula = Sqr(.MMult(.Transpose(Array1), .MMult(Array2,
Array1)))
End With
End Function
Why? Why in a spreadsheets it works and in vba it doesn`t?
Thank you
Gabriel