ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Is there a command like subtotal but with a conditional? (https://www.excelbanter.com/excel-worksheet-functions/15585-there-command-like-subtotal-but-conditional.html)

Hiughs

Is there a command like subtotal but with a conditional?
 
I want to perform several calculations but using something like subtotal()
but taking consideration of certain conditions like sumif(), in others words,
sumif() works but doesn´t change when i manipulte the filters and subtotal()
works with the filters but not with the diferent conditions... What can i do?

Peo Sjoblom

One solution


=SUMPRODUCT(--($B$2:$B$2005),--($A$2:$A$200),--(SUBTOTAL(3,OFFSET($B$2,ROW(
$B$2:$B$200)-MIN(ROW($B$2:$B$200)),,))))

will sum values in a filtered list where B2:B200 5 and sum the
corresponding cells in A



--

Regards,

Peo Sjoblom



"Hiughs" wrote in message
...
I want to perform several calculations but using something like subtotal()
but taking consideration of certain conditions like sumif(), in others

words,
sumif() works but doesn´t change when i manipulte the filters and

subtotal()
works with the filters but not with the diferent conditions... What can i

do?




All times are GMT +1. The time now is 10:31 PM.

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