Formula Errors

How to Fix INDEX MATCH and SUMPRODUCT #REF! Errors in Excel

Steven ParkerSteven Parker Nov 4, 2026 871 views

Question details

The user needs to fix a #REF! error that occurs when calculating specific categories using a combined SUMPRODUCT and INDEX/MATCH formula.

How to Fix INDEX MATCH and SUMPRODUCT #REF! Errors in Excel
Product
Excel
Device & OS
not provided
Scenario
Calculating categorized data such as Position, Division, Total Hours, and Level of Expertise across multiple worksheets using advanced array and lookup formulas.
Observed behavior
The calculation works correctly for one category but throws a #REF! error for other values (like Intermediate or Apprentice) or when pointing to another worksheet.
Before you start

Before troubleshooting, ensure all worksheets referenced in your formula are currently open and have not been renamed or deleted. Additionally, verify that your lookup criteria do not contain accidental leading or trailing spaces.

Solution 1Recommended

Align INDEX and MATCH Range Dimensions

A #REF! error often occurs if the row or column number returned by the MATCH function exceeds the bounds of the array provided in the INDEX function. Matching array dimensions resolves this.

When combining SUMPRODUCT with INDEX and MATCH, all referenced arrays must be perfectly aligned. If INDEX looks at a 100-row range but MATCH is evaluating an entire column, the returned index position may fall outside the target array, triggering a #REF! error.

1
Locate the error

Select the cell containing the SUMPRODUCT formula that is returning the #REF! error.

2
Examine the formula bar

Look specifically at the INDEX(array, row_num, [column_num]) segment of the formula.

3
Compare range sizes

Check the lookup array inside your MATCH function. Ensure it has the exact same starting and ending rows as the array referenced in the INDEX function (e.g., if INDEX uses A2:A200, MATCH must use B2:B200).

4
Apply the fix

Correct any mismatched ranges so they share the exact same dimensions, then press Enter to recalculate the formula.

Align INDEX and MATCH Range Dimensions
Cross-sheet reference check: If the formula pulls data from another worksheet, verify that the sheet name is spelled exactly as it appears on the tab and is wrapped in single quotes if it contains spaces (e.g., 'Data Sheet'!A1:B10).

Easily Troubleshoot Complex Formulas in WPS Spreadsheet

WPS Spreadsheet provides powerful formula auditing tools and full support for advanced functions like SUMPRODUCT, INDEX, and MATCH. It helps you seamlessly build, debug, and manage complex calculations across multiple sheets.

  1. 1. Open your file: Launch WPS Spreadsheet and open your .xlsx or .csv workbook.
  2. 2. Locate the error: Click on the cell displaying the #REF! error.
  3. 3. Audit the formula: Go to the Formulas tab and select 'Evaluate Formula' to step through the SUMPRODUCT and INDEX/MATCH execution.
  4. 4. Fix the reference: Identify the mismatched range or invalid worksheet reference, adjust the dimensions in the formula bar, and press Enter.
100% compatible with Microsoft Excel formulas and file formats (.xlsx).Built-in Error Checking and Evaluate Formula tools for easy debugging.Lightweight software that handles large datasets and array formulas smoothly.Free to use with a clean, familiar tabbed interface.
microsoft office alternative - wps office

Frequently Asked Questions

Why does my INDEX MATCH formula return #REF! for only certain values?

This usually happens when the MATCH function returns a row or column number that is larger than the range provided to the INDEX function. For example, if INDEX is looking at a 10-row range but MATCH searches an entire column and finds a match at row 15, Excel throws a #REF! error. Ensure your lookup values and array bounds are consistent.

Can SUMPRODUCT cause a #REF! error directly?

SUMPRODUCT itself rarely causes a #REF! error. The error usually originates from nested functions inside it, such as an INDEX/MATCH combination that references a deleted cell, a closed external workbook, or an incorrectly sized array.

How do trailing spaces affect INDEX MATCH calculations?

If your lookup criteria has a trailing space but your source data does not, MATCH will fail to find the value and return an error. Using functions like TRIM() around your lookup values can prevent space-related mismatches.

How do I fix cross-sheet reference #REF! errors?

Check that the worksheet you are referencing hasn't been deleted or renamed. Ensure that the sheet name in the formula is enclosed in single quotes if it contains spaces, and verify that the column or row references point to existing, valid cells.