
📎 This article includes 2 downloadable practice files ↓
Before dynamic arrays, SUMPRODUCT was the secret weapon of Excel experts, because it handles arrays without Ctrl+Shift+Enter. It still is useful in every version.
In this article
The basic idea
=SUMPRODUCT(B2:B10, C2:C10) ' qty × price for each row, then added up
It multiplies the ranges row by row and sums the products — total sales value in one formula, no helper column.
Counting and summing with conditions
=SUMPRODUCT((A2:A100="North")*(C2:C100>=10)) ' count rows
=SUMPRODUCT((A2:A100="North")*(C2:C100>=10), D2:D100) ' sum amounts
Each comparison gives TRUE/FALSE; multiplying turns them into 1/0. It works like COUNTIFS/SUMIFS but also accepts calculations inside the conditions.
Things SUMIFS cannot do
| Need | SUMPRODUCT |
|---|---|
| Condition on a month of a date | =SUMPRODUCT((MONTH(B2:B100)=3)*D2:D100) |
| OR logic | =SUMPRODUCT(((A2:A100="North")+(A2:A100="East")>0)*D2:D100) |
| Case-sensitive count | =SUMPRODUCT(--EXACT(A2:A100,"ABC")) |
| Weighted average | =SUMPRODUCT(B2:B10,C2:C10)/SUM(C2:C10) |
| Count unique values | =SUMPRODUCT(1/COUNTIF(A2:A100,A2:A100)) (no blanks) |
The double minus -- converts TRUE/FALSE to 1/0 when there is nothing to multiply by. Paste any SUMPRODUCT into the Formula Explainer to see its parts.
Test formulas dynamically in our web formula laboratory or download the companion Excel workbook.
📎 Practice files for this article
⬇ Download all 2 files (ZIP · 43 KB)
- 📗SUMIFS/COUNTIFS scenarios workbookConditional sums and counts with dates, OR logic and wildcards, plus 4 classic reasons totals come out wrong — all with PASS/FAIL checks.⬇ XLSX · 9 KB
- 📗Formula combinations practice workbook50 tasks: lookups, running totals, ranks, top-N, unique counts, FY, age, text extraction, list comparison, weighted averages, ageing, rolling totals, duplicates and working days — with automatic checks.⬇ XLSX · 39 KB
Free to use for learning. Files with macros (.bas) are plain text — import them with Alt+F11 → File → Import File, and always test on a copy.
Atul (AJ) builds office-automation and local-first AI tools as Atulya AI, and works with Excel, SAP and Oracle EPM every day. He writes about the shortcuts, macros and automations that actually save time — plus the occasional wacky fact. Videos on YouTube: Lazy Automator AI (@LazyAutomatorAI).
More posts by Atul →Stuck on a step? Ask a question and the AI answers using this article.