Kelvin
Kelvin

Reputation: 8963

How to Sum Dynamic Row Totals with One Excel Formula?

I have 2 columns in my excel sheet: "hours" and "rate". I need to calculate Grand Total. The formula is simple: Hours * Rate = Total. Then SUM() all totals and you have a Grand Total. See screenshot below:

Grand Total Calculation with Third Column

However, I was wondering if it's possible to calculate Grand Total without the use of "Total" column (column "C" in my example)? In other words: Formula = A2*B2 + A3*B3 + A4*B4 + .... but the formula should be dynamic, regardless of the number of rows.

Is it possible to do with Excel? Thanks!

Excel formula sum dynamic row totals

Upvotes: 0

Views: 436

Answers (2)

player0
player0

Reputation: 1

also possible in Google Sheets:

=ARRAYFORMULA(SUM(A2:A5*B2:B5))

0

Upvotes: 1

SJR
SJR

Reputation: 23081

In B7:

=sumproduct(A2:A5,B2:B5)

does exactly what you describe in your question.

I don't know if Google Sheets has an equivalent.

Upvotes: 2

Related Questions