J
Jeff
I have an array in VBA, and I want to find the inverse using the
"MINVERSE", but I want to do this in VBA, and not use values from the
worksheet.
Sub MatrixFormuls()
Dim Array1(2, 2), Array2(2, 1), Array3(2, 2), Array4(2, 1), X(2, 2) As Double
Array1(1, 1) = 3
Array1(1, 2) = 4
Array1(2, 1) = 4
Array1(2, 2) = 8
Array2(1, 1) = 8
Array2(2, 1) = 1
'Array3(1, 1) = Application.Index(Application.MInverse(Array1), 1, 1)
X(1, 1) = Application.MInverse(Array1(2, 2))
I am trying to set X = to the inverse of Array1(2,2)
Since X will have 4 values = a 2 x 2 array I want to use the "Index"
function to get each of the inverse values and assign it to a 2x2 array.
My current code does not work
Thanks for your help
"MINVERSE", but I want to do this in VBA, and not use values from the
worksheet.
Sub MatrixFormuls()
Dim Array1(2, 2), Array2(2, 1), Array3(2, 2), Array4(2, 1), X(2, 2) As Double
Array1(1, 1) = 3
Array1(1, 2) = 4
Array1(2, 1) = 4
Array1(2, 2) = 8
Array2(1, 1) = 8
Array2(2, 1) = 1
'Array3(1, 1) = Application.Index(Application.MInverse(Array1), 1, 1)
X(1, 1) = Application.MInverse(Array1(2, 2))
I am trying to set X = to the inverse of Array1(2,2)
Since X will have 4 values = a 2 x 2 array I want to use the "Index"
function to get each of the inverse values and assign it to a 2x2 array.
My current code does not work
Thanks for your help