Excel tutorial
/

Functions

Advanced

Excel SUMPRODUCT function: sum of products and array conditions

SUMPRODUCT totals price×quantity without a helper column, gives weighted averages and conditional sums with any logic you need. Plus the common traps.

SUMPRODUCT multiplies the matching items of several columns and adds up the results. The simplest case: price × quantity in each row, then everything summed — total revenue. No helper “Amount” column needed.

Its real power lies elsewhere, though. Inside SUMPRODUCT you can write conditions as arrays: “price × quantity for Tashkent”, “January sales”, “Tashkent or Samarkand”. SUMIFS can’t do much of this, while SUMPRODUCT works in every Excel version without Ctrl + Shift + Enter.

Книга1 - Excel
—☐✕
F2fx=СУММПРОИЗВ(B2:B6;C2:C6)
ABCDEFG
1ProductPriceQtyAmountMeasureValue
2Rice18 00025450 000SUMPRODUCT1 970 000
3Oil32 00010320 000Check1 970 000
4Sugar13 50040540 000
5Flour7 80050390 000
6Tea45 0006270 000
7
Готово
One SUMPRODUCT formula gives the same result as summing helper column D (grey): 1,970,000

Syntax

=СУММПРОИЗВ(array1; [array2]; [array3]; ...)

  • array1 — the first range or array: B2:B6.
  • array2, array3 … — more ranges (up to 255). Excel multiplies them row by row: B2×C2, B3×C3 … and adds the results.

Rules:

  • All arrays must be the same size, otherwise #VALUE!.
  • Text and blank cells in comma-separated arrays count as 0.
  • With a single array, SUMPRODUCT behaves like plain SUM.

Step by step: entering SUMPRODUCT

1

Select F2 for the result.

2

Формулы → Математические → pick SUMPRODUCT.

Книга1 - Excel
—☐✕
ФайлГлавнаяВставкаРазметка страницыФормулыДанныеРецензированиеВидСправка
Вставить функциюАвтосуммаФинансовыеЛогическиеТекстовыеДата и времяСсылки и массивыМатематические
Библиотека функций
Диспетчер имён
Определённые имена
F2fx
ABCDEFG
1ProductPriceQtyMeasureValue
2Rice18 00025Revenue
3Oil32 00010
4
5
Готово

3

Select the prices (B2:B6) for Array1 and the quantities (C2:C6) for Array2. Both ranges must start and end on the same rows. Click OK.

Книга1 - Excel
—☐✕
F2fx
ABCDEFG
1ProductPriceQtyMeasureValue
2Rice18 00025Revenue
3Oil32 00010
4
5
Готово

4

The result is 1,970,000. The formula: =СУММПРОИЗВ(B2:B6;C2:C6). Add a third array (say, a discount factor) and it joins the product too.

Example 1: a weighted average — GPA by credits

Plain AVERAGE treats every subject equally. But 6-credit math matters more than 2-credit history. A weighted average is the sum of “score × credits” divided by the sum of credits:

=СУММПРОИЗВ(B2:B6;C2:C6)/СУММ(C2:C6)

The same approach gives an average purchase price (price × volume / total volume), portfolio return and more.

Книга1 - Excel
—☐✕
F2fx=ОКРУГЛ(СУММПРОИЗВ(B2:B6;C2:C6)/СУММ(C2:C6);1)
ABCDEFG
1SubjectScoreCreditsMeasureValue
2Math926Weighted86,3
3Economics784Plain AVERAGE83,0
4English852
5History652
6Computer Science955
7
Готово
High scores in heavy-credit subjects lift the weighted average to 86.3; the plain average is 83

Example 2: a conditional sum of products

You need Tashkent revenue, but the table only has price and quantity. SUMIFS can’t do it without a helper column. SUMPRODUCT accepts the condition as an array:

=СУММПРОИЗВ((A2:A7="Tashkent")*C2:C7*D2:D7)

How it works: A2:A7="Tashkent" gives TRUE or FALSE for each row. In multiplication TRUE = 1 and FALSE = 0, so rows from other cities are multiplied by 0 and drop out of the sum.

If you prefer commas, turn TRUE/FALSE into numbers with a double minus --: =СУММПРОИЗВ(--(A2:A7="Tashkent");C2:C7;D2:D7).

Книга1 - Excel
—☐✕
fx
ABCDEFG
1CityProductPriceQtyWritten asResult
2TashkentRice18 00025with *1 260 000
3SamarkandOil32 00010-- and commas1 260 000
4TashkentSugar13 50040commas, no --01
5BukharaFlour7 80050
6TashkentTea45 0006
7SamarkandRice18 00015
8
Готово
F2: =SUMPRODUCT((A2:A7="Tashkent")*C2:C7*D2:D7). F3: =SUMPRODUCT(--(A2:A7="Tashkent"),C2:C7,D2:D7). 1 — F4: =SUMPRODUCT((A2:A7="Tashkent"),C2:C7,D2:D7) — 0!

Pro level: “or”, by month and case-sensitive

Inside SUMPRODUCT any function can serve as a condition, whereas SUMIFS only works with ready-made columns.

  • “Or” — by adding. =СУММПРОИЗВ(((A2:A7="Tashkent")+(A2:A7="Samarkand")>0)*C2:C7*D2:D7). The >0 prevents double-counting a row that matches both conditions.
  • By month — no helper column. =СУММПРОИЗВ((МЕСЯЦ(A2:A7)=1)*B2:B7) — January sales. To count them: =СУММПРОИЗВ(--(МЕСЯЦ(A2:A7)=1)). Careful: if the data spans several years, add a YEAR condition too.
  • Case-sensitive. =СУММПРОИЗВ(--СОВПАД(B2:B9;"AB-1")) — COUNTIF would also count “ab-1”; this formula won’t.
  • In Microsoft 365. Thanks to dynamic arrays, =СУММ((A2:A7="Tashkent")*C2:C7*D2:D7) works too. But SUMPRODUCT gives the same result in older versions — safer when the file goes to other people.
Книга1 - Excel
—☐✕
fx
ABCDEFG
1DateAmountMeasureResult
203.01.20251 250 000January total3 990 000
314.01.2025640 000February total3 120 000
429.01.20252 100 000January count3
504.02.2025910 000
612.02.20251 730 000
724.02.2025480 000
8
Готово
F2: =SUMPRODUCT((MONTH(A2:A7)=1)*B2:B7). F3: =SUMPRODUCT((MONTH(A2:A7)=2)*B2:B7). F4: =SUMPRODUCT(--(MONTH(A2:A7)=1))

Try it in the simulator

Type =СУММПРОИЗВ(B2:B6;C2:C6) in F2 to get total revenue. Then change the quantity in C3 to 20 — how much did the total grow?

Книга1 - Excel
—☐✕
Буфер обмена
Шрифт
Выравнивание
Число
Стили
Ячейки
Редактирование
✕✓fx
ABCDEFGHIJKLMNOPQRSTUVWX
1ProductPriceQtyMeasureValue
2Rice1800025Revenue
3Oil3200010
4Sugar1350040
5Flour780050
6Tea450006
7
8
9
10
Лист1
Готово

Has ExcelLab been useful?

Support the project and help us release new lessons and exercises.

Support us
Previous

93 / 154