Type =SUMPRODUCT(C2:C5,D2:D5) and press Enter to build the formula using the sample list above. The results of multiplying each cell in column C by its corresponding cell in the same row in column D are totaled up. $78.97 is the total cost of the groceries.