ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Conditional sum (https://www.excelbanter.com/excel-worksheet-functions/8631-conditional-sum.html)

PO

Conditional sum
 
Hi!

I use the formula =Sum("A1:A100") to perform a sum. However the user can
filter the data and then I want the formula to only perform the sum on the
filtered data (visible data).

How do I write this formula?

Regards
PO



Peo Sjoblom

Use the SUBTOTAL function

=SUBTOTAL(9,A1:A100)

will sum visible cells that have been filtered (from 2003 you can sum
visible cells that where other cells have been hidden as well), look in help
for other options like average and count


Regards,

Peo Sjoblom

"PO" wrote:

Hi!

I use the formula =Sum("A1:A100") to perform a sum. However the user can
filter the data and then I want the formula to only perform the sum on the
filtered data (visible data).

How do I write this formula?

Regards
PO





All times are GMT +1. The time now is 02:01 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com