How to Troubleshoot Excel MMULT and INDIRECT Reference Errors
Question details
The user is experiencing reference errors when nesting the INDIRECT function inside the MMULT function, despite INDIRECT working properly with other functions like MAX.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Performing matrix multiplication where the array ranges are generated dynamically using the INDIRECT function.
- Observed behavior
- The formula returns an error inside the MMULT function, even though the same INDIRECT reference text successfully evaluates in other array functions such as TRANSPOSE.
Before proceeding, ensure that the cells referenced by your INDIRECT formula contain strictly numeric values, as the MMULT function will return an error if it encounters empty cells or text strings.
Verify Array Dimensions and Text Reference Format
Ensure that your INDIRECT text string is properly formatted and that both array ranges evaluate to dimensions mathematically compatible for matrix multiplication.
The MMULT function has strict mathematical requirements for matrix multiplication. The number of columns in the first array must exactly match the number of rows in the second array. If INDIRECT returns an improperly sized range, MMULT will fail.
Select the cell containing your text reference and ensure it forms a valid A1-style string (e.g., 'G4:H18'). Any typos in the reference text will prevent INDIRECT from retrieving the correct range.
If referencing another worksheet, confirm that the sheet name is enclosed in single quotation marks if it contains spaces (e.g., 'Sheet 1'!A1:B2).
Check the dimensions of the two arrays supplied to the MMULT function. Count the columns of Array1 and the rows of Array2 to verify they are identical.
Highlight the dynamically referenced ranges and confirm that all cells contain numbers. Clear any hidden spaces or text values that might disrupt the calculation.

Calculate Dynamic Matrices Easily with WPS Spreadsheet
WPS Spreadsheet fully supports advanced array functions like MMULT and INDIRECT. You can easily build dynamic matrix multiplication formulas with high accuracy and fast calculation speeds.
- 1. Open WPS Spreadsheet: Launch WPS Office and open a new or existing Spreadsheet document containing your matrix data.
- 2. Format your arrays: Input your numeric matrix data into the spreadsheet, verifying that there are no empty cells or text entries in your target ranges.
- 3. Apply MMULT and INDIRECT: Select your output range, type your formula combining =MMULT() and =INDIRECT(), and press Enter to execute the matrix multiplication.

Frequently Asked Questions
Why does my MMULT function return a #VALUE! error?
A #VALUE! error typically occurs if the matrix dimensions are mathematically incompatible (the columns of the first array do not match the rows of the second array) or if one or more cells within the arrays contain text or are empty.
Why does INDIRECT work with MAX but fail with MMULT?
The MAX function evaluates numbers in a given range and simply ignores text or empty cells without failing. MMULT, however, strictly requires identical mathematical matrix dimensions and fully numeric values. If INDIRECT fetches an improperly sized range, MMULT will instantly return an error.
How do I correctly reference another worksheet using INDIRECT?
When referencing another sheet dynamically, ensure your text string incorporates single quotes around the sheet name if it contains spaces. For example, your formula syntax should look like: =INDIRECT("'"&A1&"'!B2:C5").




