Fix Excel SUMPRODUCT #VALUE! Error with a Text Header Row
Question details
The user needs to sum matching rows across multiple columns without a SUMPRODUCT error when the selected ranges include a text header row.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A SUMPRODUCT formula compares column G with RN1550 and sums values in columns RD through RF. The user extends the ranges from row 10 to include headers in row 9.
- Observed behavior
- The formula works with ranges beginning at row 10 but returns #VALUE! when the text-only header row is included.
Check that row 9 contains headers and row 10 is the first data row. Confirm that G contains the matching values, RD through RF contain the amounts to sum, and RN1550 contains the criterion.
Exclude the header row and sum each amount column
Use this approach when the calculation does not need to include row 9.
Multiplying a text header directly can cause #VALUE!. Also, separate SUMPRODUCT array arguments must have matching dimensions: G10:G75 is one column wide, while RD10:RF75 is three columns wide.
Click the cell containing the SUMPRODUCT formula and select the formula bar.
Replace the simplified formula with =SUMPRODUCT(--(G10:G75=RN1550),RD10:RD75)+SUMPRODUCT(--(G10:G75=RN1550),RE10:RE75)+SUMPRODUCT(--(G10:G75=RN1550),RF10:RF75). Press Enter.
Compare the result with the values in RD:RF for rows where column G matches RN1550. If your original formula uses named ranges or IFS, check that the selected amount ranges also start at row 10 and end at row 75.

Include row 9 while converting text to zero
Use this approach if the ranges must continue to include the header row.
Fix the SUMPRODUCT Formula in WPS Spreadsheet
Open your workbook in WPS Spreadsheet and use matching one-column SUMPRODUCT ranges to calculate the total without including text headers.
- 1. Open the workbook: In WPS Spreadsheet, choose Open and select your Excel workbook.
- 2. Select the result cell: Click the cell containing the SUMPRODUCT formula and select the formula bar.
- 3. Enter matching ranges: Enter =SUMPRODUCT(--(G10:G75=RN1550),RD10:RD75)+SUMPRODUCT(--(G10:G75=RN1550),RE10:RE75)+SUMPRODUCT(--(G10:G75=RN1550),RF10:RF75), then press Enter.
- 4. Check and save: Verify the total against matching rows, then choose File > Save As to save the workbook.

Frequently Asked Questions
Why does adding the header row cause #VALUE!?
A formula that directly multiplies the selected ranges attempts to multiply text headers as well as numbers. Start the ranges at row 10 or explicitly convert nonnumeric entries before multiplication.
Why does SUMPRODUCT still fail when the ranges have the same number of rows?
Separate SUMPRODUCT array arguments must match in both rows and columns. G9:G75 has one column, while RD9:RF75 has three. Use a separate SUMPRODUCT for each amount column.
Can I keep the header row in my formula?
Yes. Use matching one-column ranges and an expression such as IFERROR(1*RD9:RD75,0) to convert nonnumeric values to zero. Note that this also converts cell errors to zero.
What should I check if my formula uses IFS or named ranges?
Check that each selected or named range refers to the intended rows and that the arrays passed together to SUMPRODUCT have the same dimensions. For the header-free approach, the data ranges should begin at row 10.




