# Solved: Excel - sum of filtered list?



## bigste78 (Apr 18, 2004)

I have a series of worksheets set up for recording payments. Basically, I have one column containing a company name, and separate columns for data including; cost, tax and total. I would like to be able to filter the list by company name and return a sum of the data elements for a particular company. At present, I have tried using macros to add the autosum for a series of cells in each column, but this would include the hidden data not included on a particular filter. Is there a way to sum only the visible elements produced when running the filter?

I hope that makes sense?!?  

Thanks


----------



## kiwiguy (Aug 17, 2003)

If I understand what you want, just apply a filter (any filter) and do a standard SUM=(range:range) at the bottom of the physical total list shown.

The Sum formula will change to a SUBTOTAL formula and always only sum the visible cells.

The only trick is, you must create the formula it on a filtered list first or it will continue to sum the hidden cells.


----------



## bigste78 (Apr 18, 2004)

Thanks! Subtotal was exactly what I needed. Works perfectly now. I was too busy trying to find my solution using a sum function.

Thanks again for your help.


----------



## kiwiguy (Aug 17, 2003)

Glad it worked. It's a function I use daily.


----------

