14.4 C
London
Monday, July 7, 2025
HomeSoftware TutorialsExcelHow to Sum Filtered Rows in Excel (With Example)

How to Sum Filtered Rows in Excel (With Example)

Related stories

Learn About Opening an Automobile Repair Shop in India

Starting a car repair shop is quite a good...

Unlocking the Power: Embracing the Benefits of Tax-Free Investing

  Unlocking the Power: Embracing the Benefits of Tax-Free Investing For...

Income Splitting in Canada for 2023

  Income Splitting in Canada for 2023 The federal government’s expanded...

Can I Deduct Home Office Expenses on my Tax Return 2023?

Can I Deduct Home Office Expenses on my Tax...

Canadian Tax – Personal Tax Deadline 2022

  Canadian Tax – Personal Tax Deadline 2022 Resources and Tools...

The easiest way to take the sum of a filtered range in Excel is to use the following syntax:

SUBTOTAL(109, A1:A10)

Note that the value 109 is a shortcut for taking the sum of a filtered range of rows.

The following example shows how to use this function in practice.

Example: Sum Filtered Rows in Excel

Suppose we have the following dataset that contains information about various basketball teams:

Next, let’s filter the data to only show the players on the Mavs or the Warriors.

To do so, highlight the cell range A1:B10. Then click the Data tab along the top ribbon and click the Filter button.

Then click the dropdown arrow next to Team and then uncheck the box next to Celtics, then click OK:

The data will automatically be filtered to remove rows with “Celtics” as the team:

If we attempt to use the SUM() function to sum the points column of the filtered rows, it will actually return the sum of all of the original values:

Instead, we can use the SUBTOTAL() function:

sum filtered rows in Excel

This function takes the sum of only the visible rows.

We can manually verify this by taking the sum of the visible rows:

Sum of Points in Visible Rows: 99 + 94 + 93 + 104 + 109 + 84 = 583.

Additional Resources

The following tutorials explain how to perform other common operations in Excel:

How to Delete Filtered Rows in Excel
How to Count Filtered Rows in Excel
How to Calculate the Sum by Group in Excel
How to Count by Group in Excel

Subscribe

- Never miss a story with notifications

- Gain full access to our premium content

- Browse free from up to 5 devices at once

Latest stories