Fix SUMPRODUCT Criteria Range Errors in Excel
Question details
The user needs to correct a SUMPRODUCT formula that sums values using row and column criteria.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Summing values across multiple columns on a source sheet based on matching row labels and column headers.
- Observed behavior
- The formula returns an #N/A error, and its row criteria range starts before the data range.
Open the workbook and identify the row labels, column headers, and values used by the formula. Check that each criteria range covers the same rows or columns as the corresponding data range.
Align the SUMPRODUCT Criteria and Data Ranges
Use matching row and column boundaries so each criterion corresponds to the intended values.
Select the cell containing SUMPRODUCT and check its references in the formula bar. In this example, the row criteria range B11:B34 starts before the values range D13:O34.
In the formula bar, change 'Petty cash - EUR'!$B$11:$B$34 to 'Petty cash - EUR'!$B$13:$B$34 so it covers the same rows as the values.
Make sure the header range 'Petty cash - EUR'!$D$12:$O$12 covers the same columns as the values range 'Petty cash - EUR'!$D$13:$O$34.
In the formula cell, enter =SUMPRODUCT(('Petty cash - EUR'!$B$13:$B$34='Petty cash - summary'!$B10)*('Petty cash - EUR'!$D$12:$O$12='Petty cash - summary'!D$8)*'Petty cash - EUR'!$D$13:$O$34) and press Enter. Adjust the sheet names and references to match your workbook.
If the result is still #N/A, inspect the referenced criteria, header, and value cells for #N/A or other errors and correct their source.

Correct SUMPRODUCT Ranges in WPS Spreadsheet
Open your workbook in WPS Spreadsheet and align the row criteria, column headers, and data ranges in the SUMPRODUCT formula.
- 1. Open the workbook: Open WPS Spreadsheet, select Open, and choose the Excel workbook containing the formula.
- 2. Inspect the references: Select the SUMPRODUCT cell and review its ranges in the formula bar. Identify the first and last rows and columns of the data array.
- 3. Align the ranges: Edit the formula bar so the row criteria covers the data rows and the header criteria covers the data columns; for example, use B13:B34 and D12:O12 with D13:O34.
- 4. Confirm and save: Press Enter, check the result, and select File > Save to save the workbook.

Frequently Asked Questions
Why do the SUMPRODUCT criteria ranges need to align with the data?
Each row criterion must correspond to a data row, and each column criterion must correspond to a data column. For data in D13:O34, use row labels from rows 13 through 34 and headers from columns D through O.
Can a source cell cause SUMPRODUCT to return #N/A?
Yes. Check the cells referenced by the row criteria, column criteria, and data ranges for #N/A or other errors, then correct the underlying values or formulas.
Do I need Ctrl+Shift+Enter for SUMPRODUCT?
Usually, SUMPRODUCT can be confirmed with Enter. In an older Excel version, if the formula requires array entry, select the cell, press F2, and then press Ctrl+Shift+Enter.
How do I apply the corrected formula to my own workbook?
Replace the example sheet names and cell references in the formula bar with your own. Keep the row criteria aligned with the data rows and the column criteria aligned with the data columns.




