Ravindra BagaleCourses & study guides मराठी Track your progress

3. Formulas and Functions

3.16 SUMPRODUCT

SUMPRODUCT with example — in 30 seconds

What: SUMPRODUCT multiplies matching items in ranges and adds the results. A TRUE/FALSE test inside it acts like a filter.

Why: It answers questions with conditions and weights in one cell, for example a quantity-weighted average delivery time.

Tiny example: Pune quantities are 2, 1, 5 and 2. =SUMPRODUCT((C2:C11="Pune")*F2:F11) gives 10.

First look at the data (before → after):

SUMPRODUCT with example: before and after tables, fictional FreshGo Maharashtra data

Expected result — Answers

Question Answer
Units sold in Pune 10
Qty-weighted average minutes 11.88

About this data: Teaching sample for a fictional shop “HomeNest Supplies”. Figures and names (e.g. Vikram Rao) are made up for this lesson on sumproduct.

Before table and formula as text

Before — Columns used (all ten rows)

C: City F: Qty H: Mins
Pune 2 9
Nashik 3 12
Pune 1 14
Nagpur 2 11
Kolhapur 4 16
Pune 5 8
Solapur 1 18
Sambhaji Nagar 3 10
Pune 2 13
Nashik 1 17

About this data: Demo table only — not real customer or company data. Built to practise sumproduct.

Formula / click path

=SUMPRODUCT((C2:C11="Pune")*F2:F11)
=SUMPRODUCT(H2:H11,F2:F11)/SUM(F2:F11)

Do it step by step:

  1. Type =SUMPRODUCT((C2:C11="Pune")*F2:F11) and press Enter.
  2. The test gives TRUE/FALSE. Multiplying turns them into 1/0, so only Pune rows count.
  3. Type =SUMPRODUCT(H2:H11,F2:F11)/SUM(F2:F11) for the weighted average.
  4. Format the second cell with 2 decimals.
  5. Check: 10 units and 11.88 minutes.

=SUMPRODUCT(array1, [array2], …) multiplies matching items and adds them. It works in every version and handles conditions without Ctrl + Shift + Enter.

Goal Formula Result
Pune quantity =SUMPRODUCT((C2:C11="Pune")*F2:F11) 10
Pune OR Nashik sales =SUMPRODUCT(((C2:C11="Pune")+(C2:C11="Nashik"))*G2:G11) 904
Weighted average delivery time (weights = Qty) =SUMPRODUCT(H2:H11,F2:F11)/SUM(F2:F11) 11.88
Sales in November (without helper column) =SUMPRODUCT((MONTH(B2:B11)=11)*G2:G11) 2,870

About this data: Made-up rows so you can copy the pattern for sumproduct. Currencies may use ₹, £, € or $.

* between conditions means AND, + means OR. TRUE/FALSE become 1/0 when multiplied.

Ravindra Bagale's Tip

In SUMPRODUCT, all ranges must be the same size – if you give C2:C11 and G2:G12, you get #VALUE!. Many students give a whole column (C:C) and the file becomes slow. Keep the ranges exact or use Table columns. And when you use + for OR, check that a single row doesn't match both conditions.

Practice task

With SUMPRODUCT find: FreshGo Fruits sales, number of orders with Amount > ₹200 and Mins ≤ 12, and the weighted average price per unit.

Loading practice tasks...

  1. Total qty of Pune (Easy): Find the total Qty for Pune.
  2. Invoice: bill total (Easy): Find the total bill: Invoice!C2:C6 times Invoice!D2:D6.
  3. Delivered amount (Medium): Find the total amount of Delivered orders with SUMPRODUCT.
  4. Count with two conditions (Medium): Count Pune orders that are Delivered with SUMPRODUCT.
  5. Invoice: Dairy total (Medium): Find the bill total of "Dairy" items only.
  6. Invoice: count rows (Medium): Count Stationery rows where Qty is more than 3.
  7. FreshGo qty (Hard): Find the total Qty of FreshGo orders.
  8. Weighted average time (Hard): Find the average Mins weighted by Qty.
  9. Invoice: Stationery qty (Hard): Find the total Qty of Stationery.
  10. Invoice: average price (Hard): Find the average price per unit: total bill ÷ total Qty.

Quick revision cards

Three standalone cards. Each one explains the idea with its own example. Scan the QR to open this lesson.

Revision card 1: What is Sumproduct?
Card 1: What is Sumproduct? · Download PNG
Revision card 2: Tiny example — Sumproduct
Card 2: Tiny example — Sumproduct · Download PNG
Revision card 3: Checklist — Sumproduct
Card 3: Checklist — Sumproduct · Download PNG