The result from MMULT is anarraythat contains the same number of rows asarray1and the same number of columns asarray2.

The MMULT function appears in certain more advanced formulas that need to process multiple rows or columns.

For example, you could use MMULT withXLOOKUPtomatch a value in any column.

MMULT example - count rows that contain specific value

The MMULT function takes twoarguments,array1andarray2, both of which are required.

The column count ofarray1must equal the row count ofarray2.

The MMULT function will return a #VALUE!

MMULT example - count rows that contain specific value

error ifarray1columns do not equalarray2rows.

Note: InExcel 365, which supportsdynamic arrays, MMULTspillsmultiple values on the worksheet.

In earlier versions, you will need to enter as amulti-cell array formulawith control + shift + enter.

MMULT example - count rows that contain specific value

The formula in G5 is:

Read adetailed explanation here.

See below for more examples.

This resulting matrix contains ones on the main diagonal and zeros in every other position.

MMULT example - count rows that contain specific value

MINVERSE Function

The Excel MINVERSE function returns the inverse matrix of a given array.

The input array must contain numbers only and be a square matrix, with equal rows and columns.

The result is an inverse matrix with the same dimensions as the array provided.

MMULT example - count rows that contain specific value

MDETERM Function

The Excel MDETERM function returns the matrix determinant of a given array.

The input array must contain numbers only and be a square matrix, with equal rows and columns.

The result is a number representing the matrix determinant.

Excel formula: Get row totals

Excel formula: Sort and extract unique values

Excel formula: Count rows that contain specific values

Excel formula: Count cells that do not contain many strings

Excel formula: Index and match on multiple columns

Excel formula: Get column totals

Excel formula: XLOOKUP match any column

Excel formula: Count columns that contain specific values

Excel formula: Count rows with at least n matching values

Excel SUMPRODUCT function

Excel MUNIT function

Excel MINVERSE function

Excel MDETERM function

MMULT example - count rows that contain specific value