SUMPRODUCT and SUBTOTAL
Revenue without a helper column, sums and counts with AND/OR conditions, weighted average price, SUBTOTAL 9 and 1 for filtered tables.
- A wholesale sales table: each row has a quantity and a unit price. In cell D11, calculate total revenue (the sum of quantity × price) in one SUMPRODUCT formula.
- In cell D12, calculate the total units sold in Tashkent using SUMPRODUCT (condition: column B = "Tashkent").
- In cell D13, calculate revenue (quantity × price) for Tashkent only, using SUMPRODUCT.
- In cell D14, calculate the total units sold using SUBTOTAL (function number 9 = sum).
- In cell D15, calculate the simple average of the prices using SUBTOTAL.
- In cell D16, use SUMPRODUCT to count the rows where more than 100 units were sold in Tashkent.
- Trap: in cell D17, calculate the average price per unit sold (weighted average price): total revenue / total units.
- In cell D18, calculate revenue (quantity × price) for Samarkand OR Bukhara using SUMPRODUCT.