ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Subtotal on SumIf (https://www.excelbanter.com/excel-worksheet-functions/27843-subtotal-sumif.html)

Steven

Subtotal on SumIf
 
Can you use subtotal on a sumif or maybe some other method so when data is
filtered it calculates correctly. I have tried many things but cannot make
it work.



Peo Sjoblom

here is a method

=SUMPRODUCT(--($A$2:$A$1005),--(SUBTOTAL(3,OFFSET($A$2,ROW($A$2:$A$100)-MIN(ROW($A$2:$A$100)),,))),$A$2:$A$100)

this will sum all visible entries in A2:A100 that are greater than 5
where for instance column B could have been filtered



Regards,

Peo Sjoblom

"Steven" wrote:

Can you use subtotal on a sumif or maybe some other method so when data is
filtered it calculates correctly. I have tried many things but cannot make
it work.




All times are GMT +1. The time now is 06:09 AM.

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