# SUMPRODUCT formula generator

> Describe what you need and get a SUMPRODUCT formula for Excel and Google Sheets, run on real data before you copy it. Plus 8 tested SUMPRODUCT examples.

Source: https://spreadsheetpractice.com/tools/formula-generator/sumproduct · Updated October 29, 2026 · Formulas and results on this page were run by the Spreadsheet Practice formula engine on November 20, 2026

SUMPRODUCT multiplies matching items in two or more ranges and adds the results.

Describe the task at [SUMPRODUCT formula generator](https://spreadsheetpractice.com/tools/formula-generator/sumproduct) and get a SUMPRODUCT formula for Excel and Google Sheets, tested on real data.

## Tested SUMPRODUCT examples

### Why COUNTA counts cells that look empty

`=SUMPRODUCT(--(C2:C10<>""))`

Excel. Result on the sample sheet: 5. [See it and try it](https://spreadsheetpractice.com/formulas/counta-counts-blank-looking-cells)

### Calculate a weighted score

`=SUMPRODUCT(B2:E2,$B$8:$E$8)`

Excel. Result on the sample sheet: 5 rows (F2:F6). [See it and try it](https://spreadsheetpractice.com/formulas/weighted-score)

### Count rows where two columns match

`=SUMPRODUCT(--(B2:B11=C2:C11))`

Excel. Result on the sample sheet: 6. [See it and try it](https://spreadsheetpractice.com/formulas/count-rows-where-two-columns-match)

### Count rows where one column is greater than another

`=SUMPRODUCT(--(C2:C11>B2:B11))`

Excel. Result on the sample sheet: 5. [See it and try it](https://spreadsheetpractice.com/formulas/count-rows-where-one-column-is-greater-than-another)

### Sum if one column is greater than another

`=SUMPRODUCT((C2:C7>B2:B7)*C2:C7)`

Excel. Result on the sample sheet: $67,420. [See it and try it](https://spreadsheetpractice.com/formulas/sum-if-one-column-is-greater-than-another)

### Use SUMPRODUCT with criteria

`=SUMPRODUCT((A2:A8=G1)*C2:C8*D2:D8)`

Excel. Result on the sample sheet: $1,117.50. [See it and try it](https://spreadsheetpractice.com/formulas/sumproduct-with-criteria)

### Calculate NPV

`=NPV(E1,B3:B7)+B2`

Excel. Result on the sample sheet: $9,548.82. [See it and try it](https://spreadsheetpractice.com/formulas/calculate-npv)

### Why does COUNTIF return 0 when the criteria refers to a cell

`=COUNTIF(B2:B8,">="&E1)`

Excel. Result on the sample sheet: 5. [See it and try it](https://spreadsheetpractice.com/formulas/countif-criteria-with-cell-reference)

## Questions

### What does the SUMPRODUCT formula generator do?

You describe the task in plain English, and it writes the formula, using SUMPRODUCT where that's the right tool, for your table or a sample one. The formula is run in our engine in Excel and Google Sheets mode before you see it, so you get its result, not just a guess.

### What does SUMPRODUCT do?

SUMPRODUCT multiplies matching items in two or more ranges and adds the results.

### Can I learn to write SUMPRODUCT formulas myself?

Yes. Each example below opens a page where you try the formula in a live grid and it's checked as you go, and the SUMPRODUCT function page has a practice exercise.

---

Spreadsheet Practice (https://spreadsheetpractice.com) teaches spreadsheet formulas by practice: every exercise is graded in a live grid and re-checked on changed data.
