Multiply and add up with SUMPRODUCT
What does the whole order come to? Each row is a quantity times its unit price, and the answer goes in F2.
keyboard Typing formulas is easiest on a computer with a keyboard.
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | Product | Quantity | Unit price | Order total | |||
| 2 | Monitor Stand | 2 | 40.49 | ||||
| 3 | Headset | 5 | 120.99 | ||||
| 4 | Office Chair | 3 | 95.5 | ||||
| 5 | Bookshelf | 8 | 155.99 | ||||
| 6 | USB-C Hub | 3 | 42.5 | ||||
| 7 | Notebook A5 | 10 | 2.25 | ||||
| 8 | Filing Cabinet | 6 | 183 | ||||
| 9 | Desk Organiser | 3 | 20.49 | ||||
| 10 | |||||||
| 11 | |||||||
| 12 | |||||||
| 13 |
How SUMPRODUCT works
What does
SUMPRODUCTdo?It multiplies two ranges row by row, then adds up the results.
=SUMPRODUCT(B2:B9,C2:C9)isB2×C2+B3×C3+ … +B9×C9in one cell.Why not a helper column?
You could put
=B2*C2in every row andSUMthat column.SUMPRODUCTgives the same total without the extra column.Why not
SUMtimesSUM?=SUM(B2:B9)*SUM(C2:C9)multiplies the total quantity by the total of the prices, which is a much bigger, meaningless number. Each quantity has to be multiplied by its own price first.What else can it do?
The ranges must be the same size. A condition inside works as a filter:
=SUMPRODUCT((A2:A9="Furniture")*B2:B9*C2:C9)totals one category only. In newer Excel,=SUM(B2:B9*C2:C9)works too.
Know someone fighting with a spreadsheet? Send them this page.