In Excel: use =SUMPRODUCT(range1, range2) — it multiplies the ranges row by row and adds the results, so quantities × prices becomes a single order total.
On this page8
Syntax
Arguments
| Argument | required / optional | Description |
|---|---|---|
array1 | required | The first range or array. All arrays must have identical dimensions. |
array2, ... | optional | Further ranges of the same shape, multiplied element by element before summing. |
Related functions
3 value/weight pairs · Unweighted mean: 80.0000
What this does
SUMPRODUCT multiplies corresponding elements of equally sized ranges and sums the products. That one behaviour covers a surprising amount of ground: order totals from quantity and price columns, weighted averages, and — because TRUE and FALSE become 1 and 0 when multiplied — conditional counting and summing with logic that SUMIFS cannot express, such as criteria that reference a calculation rather than a plain column. It was the standard multi-criteria tool before SUMIFS existed and remains the answer when the condition is an expression. Every array must have identical dimensions or the result is #VALUE!. Keep the inputs visible and clearly labelled and the whole thing stays auditable — anyone who opens the file later, including you, can see at a glance exactly what feeds the result and change one assumption without hunting through the formula. For “use sumproduct in excel”, the reliable version is a short checking loop, not just the first command that appears to work. Run it on a deliberately small range first, watch how the affected cells change, and only then apply the same setup to the full sheet. When a formula is involved, keep the inputs labelled beside it, reference cells instead of typing values, and apply number formatting only after the result checks out. That is what makes a workflow that saves repeating the same clicks every week useful in real work: repeatable, auditable, and not dependent on memory or luck.
A worked example
Quantities in B2:B20 and unit prices in C2:C20: =SUMPRODUCT(B2:B20, C2:C20) returns the order value in one cell, with no helper column. A weighted average of scores and weights: =SUMPRODUCT(B2:B20, C2:C20)/SUM(C2:C20). Counting rows where the region is West and the value exceeds 1,000: =SUMPRODUCT((A2:A20="West")*(D2:D20>1000)). SUMPRODUCT replaces an entire helper column with one cell, and expresses conditions SUMIFS has no syntax for. A practical tip before you scale it up: build it once on a small block of test data, confirm the number against the tool on this page, and only then point it at your real sheet. That one habit catches almost every mistake while it is still cheap to fix, long before a wrong figure reaches a report or a colleague.
In Google Sheets
Everything above works in Google Sheets too. Excel and Sheets share the formula syntax used here; only the surrounding menus are arranged differently. That portability is deliberate — learn it once and it follows you between the two tools and across Windows and Mac. Keep this page bookmarked for the next time the same question comes up. Better still, rebuild the example once in your own sheet — doing it yourself, with the tool above to check against, is what turns a copied formula into a technique you own. Treat “use sumproduct in excel” as a small building block rather than a chore. Once the inputs sit in their own cells and the formula reads from them, the same setup answers a dozen related questions with a tweak, and Excel keeps every dependent figure current as the data changes. The tool above is there so you can rehearse and verify before committing anything to a real workbook; the steps and worked example are there so the logic sticks. Get it right once and it stops costing you time — it starts saving it, every time the question comes back around.
Common mistakes
- Ranges of different sizes, which returns
#VALUE!— this is the single most commonSUMPRODUCTerror. - Including whole-column references such as
A:Aon large sheets, which forces far more calculation than necessary and slows the workbook. - Text or errors inside a range;
SUMPRODUCTpropagates the error rather than skipping it, so clean the data or wrap terms inIFERROR.
Frequently asked questions
How do I calculate a weighted average?
=SUMPRODUCT(values, weights)/SUM(weights). The numerator multiplies each value by its weight and totals them; the denominator normalises.
Why does SUMPRODUCT return #VALUE!?
Either the ranges differ in size, or one contains text or an error value. Check the dimensions first — that is the usual cause.
When should I use SUMPRODUCT instead of SUMIFS?
When a criterion is an expression rather than a column comparison — for example testing a calculated value, or comparing two columns to each other.
Other ways people ask this
People reach this page typing “sumproduct excel formula” and “excel formula sumproduct”, among other phrasings; whichever wording you used, the fix above is the one you want.
Why do people search for this in so many different ways?
Because the same task has many names. “sumproduct excel formula”, “excel formula sumproduct” all point at the one operation explained on this page, which is why they all lead here.