You can sum the result of multiplying corresponding cells in two columns in Excel using the SUMPRODUCT
function.
Using the SUMPRODUCT Function
The SUMPRODUCT
function multiplies corresponding components in the given arrays (ranges) and returns the sum of those products. Here's how to use it:
-
Identify the Columns: Determine the columns you want to multiply and sum. For example, Column C might contain quantities, and Column D might contain prices.
-
Use the
SUMPRODUCT
Formula: In an empty cell, enter theSUMPRODUCT
formula. The general syntax is:=SUMPRODUCT(array1, array2, array3, ...)
Where
array1
,array2
, etc., are the ranges of cells you want to multiply and sum. -
Example: Let's say you have quantities in cells
C2:C5
and prices in cellsD2:D5
. The formula would be:=SUMPRODUCT(C2:C5,D2:D5)
This formula multiplies
C2*D2 + C3*D3 + C4*D4 + C5*D5
and returns the total sum of these products.
Practical Example
Quantity | Price |
---|---|
2 | 10 |
3 | 12 |
4 | 15 |
5 | 20 |
To calculate the total value:
- In a cell (e.g.,
E2
), enter the formula=SUMPRODUCT(B2:B5,C2:C5)
. - The result in
E2
will be2*10 + 3*12 + 4*15 + 5*20 = 20 + 36 + 60 + 100 = 216
.
So, the SUMPRODUCT
function efficiently calculates the sum of the products of corresponding entries in the specified columns.