Excel SUMPRODUCT Function Guide: Weighted Sums, Multiple-Criteria Totals, and Conditional Counts

Excel SUMPRODUCT function

Excel SUMPRODUCT Function Guide: Weighted Sums, Multiple Criteria, and Conditional Counts

The Excel SUMPRODUCT function uses the simple principle of “multiplying arrays and then adding the results” to handle multiple-criteria totals, weighted averages, and conditional counts in one formula. This guide covers everything from a Quick Fix that beginners can follow right away to practical tables, formulas, and reproducible examples with expected results.

Quick Fix — Create a Multiple-Criteria Total in 3 Minutes

  1. Select the cell where you want to display the result.
  2. Connect the criteria with multiplication, multiply by the target column to be summed, and wrap the formula in SUMPRODUCT.
  3. Press Enter.
=SUMPRODUCT( --(A2:A100="Sales"), --(B2:B100="2025-09"), C2:C100 )

Quick reference: If you frequently total values with multiple criteria, see the Complete SUMIFS Function Guide. For looking up unit prices by criteria, see the Complete XLOOKUP Guide.

SUMPRODUCT Basics and Syntax

=SUMPRODUCT(array1, [array2], [array3], ...)
  • It multiplies corresponding elements and then adds all the results.
  • All arrays must be the same size.

How Array Multiplication and Addition Work

=SUMPRODUCT(C2:C5, D2:D5)

This calculates quantity×unit price for each row and adds the results.

Converting TRUE/FALSE to Numbers with “–” (Double Unary)

A2:A100="Sales" creates a TRUE/FALSE array. Adding -- in front forces each value to convert to 1/0. Multiplying these 1/0 values by the target column makes them work like a filter.

Practical Example 1 — Multiple-Criteria Total (Department = Sales, Month = 2025-09)

RowDepartmentMonth (yyyy-mm)Sales
2Sales2025-09120,000
3Sales2025-0895,000
4Development2025-0967,000
5Sales2025-0988,000
6Sales2025-10134,000

Goal: Total sales for rows where Department = Sales ∧ Month = 2025-09

=SUMPRODUCT( --(A2:A6="Sales"), --(B2:B6="2025-09"), C2:C6 )

Expected result: 208,000

If the month is an actual date, use date range comparisons (>= first day and < first day of the next month) instead of "2025-09". For COUNT functions, see COUNTIFS for Multiple-Criteria Counts.

Practical Example 2 — Weighted Average

ItemScoreWeight
Assignment850.2
Midterm920.3
Final Exam880.5
=SUMPRODUCT(B2:B4, C2:C4) / SUM(C2:C4)

Practical Example 3 — Conditional Count (Contains Text/Case-Insensitive)

Goal: Count rows containing the word “Urgent”

=SUMPRODUCT( --ISNUMBER( SEARCH("Urgent", D2:D100) ) )

Alternative Methods and Comparison — SUMIFS, PivotTables, and Power Pivot

  • SUMIFS: Best for simple conditional totals, with excellent readability and speed
  • SUMPRODUCT: Highly flexible for complex criteria, weighted sums, conditional averages, counts, and more
  • PivotTables/Power Pivot: Best for large-scale or relational analysis

Related: IF Function Basics and Applications, Complete XLOOKUP Guide

Performance Optimization and Precautions

  • Minimize ranges: Use only the actual data range instead of entire columns such as A:A.
  • Same-size rule: Make all arrays the same size (#VALUE! occurs when they do not match).
  • Mixed text and blank cells: Use -- to clearly convert values to 1/0.
  • Large datasets: Consider moving to a PivotTable or data model.

Troubleshooting

SymptomCauseSolution
#VALUE!Array sizes do not matchMake all ranges the same size
Returns 0All criteria are FALSECheck quotation marks, spaces, and formats
SlowEntire-column references or repeated SEARCHReduce ranges or consider helper columns or a PivotTable
Missing resultsIncorrect date comparison methodUse a range (>= first day, < first day of the next month)
Overcounted totalText numbers or blank cells are mixed inNormalize with VALUE/--

Conclusion & Recommended Next Articles

You can now use the Excel SUMPRODUCT function to handle multiple-criteria totals, weighted averages, and conditional counts in one formula. Next, review the Complete SUMIFS Function Guide, Complete XLOOKUP Guide, and COUNTIFS for Multiple-Criteria Counts.

Leave a Reply

Your email address will not be published. Required fields are marked *