Function Problems

Use SUMPRODUCT to Multiply and Sum Excel Values with Criteria

Emma BrownEmma Brown Nov 27, 2026 871 views

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.

Use SUMPRODUCT to Multiply and Sum Excel Values with Criteria
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.
Before you start

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.

Solution 1Recommended

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.

1
Check the value cells

In an empty cell, enter =ISTEXT(H6), then test =ISTEXT(J6). TRUE indicates that the tested value is stored as text.

2
Enter the SUMPRODUCT formula

In the result cell, enter =SUMPRODUCT(ISNUMBER(SEARCH("9",K6:K82))*ISNUMBER(SEARCH("D",I6:I82)),--H6:H82,--J6:J82).

3
Adjust the ranges

Edit the formula so all four ranges cover the same rows in your worksheet, then press Enter.

Use SUMPRODUCT with numeric conversion and text criteria
Check nonnumeric text: The double minus converts numeric text, but other text or errors in H6:H82 or J6:J82 can still cause #VALUE!, even on rows that do not match. Correct those cells or replace invalid entries as appropriate.
Calculate with WPS Spreadsheets

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. 1. Open your workbook: Open WPS Spreadsheets and use Open to select your Excel workbook.
  2. 2. Select a result cell: Click an empty cell where you want the calculated total to appear.
  3. 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. 4. Save the workbook: Use File > Save or Save As to save your changes in an Excel-compatible format.
Multiply and sum matching rows with SUMPRODUCTOpen and edit Microsoft Excel XLSX and XLS filesUse a familiar spreadsheet interfaceWork with spreadsheet files for free
microsoft office alternative - wps office

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.