How to multiply two columns and add the products (`SUM()`

) even if the number or rows increases?

For example, given a spreadsheet like this:

```
| A B
--------------
1 | 2 132.27
2 | 2 122.33
3 | 2 150.15
4 | 3 149.35
```

I need to know the total of multiplying column A with column B for each row and adding the result of every row.

Currently I am using a formula like this:

```
=(A2*B2+A3*B3+A4*B4+A5*B5+A6*B6+A7*B7+A8*B8)
```

The problem is that I need to keep updating the formula as I increase the number of rows.

Is there a better way to automate this in Excel?