Use SUMPRODUCT to Multiply and Sum Excel Values with Criteria
Question details
Multiply amounts and quantities by row and sum the results only when multiple criteria are met, including when numbers are stored as text.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- The user wants to multiply values in columns H and J for rows where column K contains 9 and column I contains D.
- Observed behavior
- The calculation may return #VALUE! when values are stored as text. A revised formula returns 0.00, but the user expects a nonzero result.
Check that columns H and J contain the values to multiply and that columns K and I contain the criteria. Adjust the example row ranges if your data is not in rows 6 through 82.
Use SUMPRODUCT with numeric conversion and text criteria
Use this formula to multiply matching rows and convert numeric text in the value columns.
SEARCH finds 9 and D anywhere in their respective cells, so it can match a 9 followed by a letter. The double minus converts numeric text in columns H and J to numbers.
In an empty cell, enter =ISTEXT(H6), then test =ISTEXT(J6). TRUE indicates that the tested value is stored as text.
In the result cell, enter =SUMPRODUCT(ISNUMBER(SEARCH("9",K6:K82))*ISNUMBER(SEARCH("D",I6:I82)),--H6:H82,--J6:J82).
Edit the formula so all four ranges cover the same rows in your worksheet, then press Enter.

Investigate a zero SUMPRODUCT result
Use these checks if the formula returns 0.00 when you expect a nonzero total.
Multiply and sum rows with criteria in WPS Spreadsheets
Use SUMPRODUCT in WPS Spreadsheets to apply text criteria, convert numeric text, and total row-by-row products.
- 1. Open your workbook: Open WPS Spreadsheets and use Open to select your Excel workbook.
- 2. Select a result cell: Click an empty cell where you want the calculated total to appear.
- 3. Enter the formula: Type =SUMPRODUCT(ISNUMBER(SEARCH("9",K6:K82))*ISNUMBER(SEARCH("D",I6:I82)),--H6:H82,--J6:J82), adjust the ranges if needed, and press Enter.
- 4. Save the workbook: Use File > Save or Save As to save your changes in an Excel-compatible format.

Frequently Asked Questions
Why does SUMPRODUCT return #VALUE!?
The value ranges may contain nonnumeric text or errors, or the ranges may be different sizes. Check H6:H82 and J6:J82 for invalid entries and make sure all ranges cover the same rows.
How can I tell whether a number is stored as text?
Enter =ISTEXT(H6) in an empty cell. TRUE means H6 is text; repeat the check for cells in column J.
Will SEARCH find 9 when it is followed by a letter?
Yes. SEARCH("9",K6:K82) looks for 9 anywhere in each cell, including within text such as 9A.
Why does the formula return zero even though some rows match?
Matching products can be zero, cancel each other out, or produce a small result rounded to 0.00. Check columns H and J on matching rows and use Home > Increase Decimal on the result cell.




