Function Problems

How to Troubleshoot Excel MMULT and INDIRECT Reference Errors

John WilsonJohn Wilson Oct 26, 2026 869 views

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.

How to Troubleshoot Excel MMULT and INDIRECT Reference Errors
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 you start

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.

Solution 1Recommended

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.

1
Check the A1-style reference format

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.

2
Verify worksheet name syntax

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).

3
Validate matrix compatibility

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.

4
Remove non-numeric data

Highlight the dynamically referenced ranges and confirm that all cells contain numbers. Clear any hidden spaces or text values that might disrupt the calculation.

Verify Array Dimensions and Text Reference Format
Why INDIRECT works elsewhere: Functions like MAX simply ignore non-numeric text and don't require specific array dimensions, which is why your INDIRECT formula might appear to work correctly in those functions but fail inside MMULT.
Advanced Spreadsheet Functions

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. 1. Open WPS Spreadsheet: Launch WPS Office and open a new or existing Spreadsheet document containing your matrix data.
  2. 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. 3. Apply MMULT and INDIRECT: Select your output range, type your formula combining =MMULT() and =INDIRECT(), and press Enter to execute the matrix multiplication.
Fully compatible with Microsoft Excel formulas and array functions.Supports dynamic cell referencing and complex nested functions.Free, lightweight, and features an intuitive tabbed interface for managing multiple sheets.
microsoft office alternative - wps office

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").