Home » Questions » Computers [ Ask a new question ]

How can I write an excel formula to do row based calculations?

How can I write an excel formula to do row based calculations?

Could someone please help me with the following excel formula. Each row in my spreadsheet contains details about a product.

Asked by: Guest | Views: 330
Total answers/comments: 1
bert [Entry]

"First I make a third coloumn which will hold our (ColB)*(ColF) Value. Say column H will hold our value...

=SUM(B[row#]*C[row#])

Which you can thing drag down all the way to the end, by grabbing the bottom right corner of the box. This will produce values for all rows. Now we can just sum the results...

=SUM(H[first row #]:H[last row #])

When you add another row, just make sure you drag your equation down one more row, and increase the end pointer of the 2nd =SUM function.

EDIT:

SumProduct is what you need...

=SUMPRODUCT((B2:B11),(C2:C11))

SUMPRODUCT - Multiplies corresponding components in the given arrays, and returns the sum of those products.

Basically it will take, one by one of course, Array 1 Cell 1 * Array 2 Cell 1, and add the result up.

That should do it!"