Google-sheets – Google Spreadsheet sum when filtering

google sheets

I have spreadsheet that looks like this:

enter image description here

Now when I filter on a company I want the total to display the sum of the whole of B column.

Since I am very new to spreadsheets I was hoping someone could help me on how I would do that?

Best Answer

Use SUBTOTAL

=SUBTOTAL(9, B2:B20)