Edit

Share via


WorksheetFunction.MMult(Object, Object) Method

Definition

Returns the matrix product of two arrays. The result is an array with the same number of rows as array1 and the same number of columns as array2.

public:
 System::Object ^ MMult(System::Object ^ Arg1, System::Object ^ Arg2);
public object MMult (object Arg1, object Arg2);
Public Function MMult (Arg1 As Object, Arg2 As Object) As Object

Parameters

Arg1
Object

Array1, array2 - the arrays you want to multiply.

Arg2
Object

Array1, array2 - the arrays you want to multiply.

Returns

Remarks

The number of columns in array1 must be the same as the number of rows in array2, and both arrays must contain only numbers.

Array1 and array2 can be given as cell ranges, array constants, or references.

MMult returns the #VALUE! error when:

Any cells are empty or contain text.

The number of columns in array1 is different from the number of rows in array2.

The size of the resulting array is equal to or greater than a total of 5,461 cells.

The matrix product array a of two arrays b and c is:

Figure1: Matrix product array a of two arrays b and c

where i is the row number, and j is the column number.

Formulas that return arrays must be entered as array formulas.

Applies to