ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Countif function (https://www.excelbanter.com/excel-worksheet-functions/162473-countif-function.html)

UB

Countif function
 
Hi
I have the following formula in one of the cell
=COUNT(IF((TRIM($C$4:$C$96)="P")*ISBLANK($M$4:$M$9 6),$A$4:$A$96))
because I am calculating number of rows where column 'c' has value 'p' and
colimn 'm' is blank.
But I have autofilter command using VBA code and I want the rows to be
counted based on the output of the filter results.
Example column 'N' has a filter where the selection is 'A' & 'B'.
I want the my formula
COUNT(IF((TRIM($C$4:$C$96)="P")*ISBLANK($M$4:$M$96 ),$A$4:$A$96)) to count
only filtered rows if the filter is used


Peo Sjoblom

Countif function
 
Please refrain from multiposting, I already gave you an answer yesterday
that let you do this



--


Regards,


Peo Sjoblom




Sandy Mann

Countif function
 
Use the SUBTOTAL() function with 2 as the 1st argument and it will only
count the visible rows with numbers.

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"ub" wrote in message
...
Hi
I have the following formula in one of the cell
=COUNT(IF((TRIM($C$4:$C$96)="P")*ISBLANK($M$4:$M$9 6),$A$4:$A$96))
because I am calculating number of rows where column 'c' has value 'p' and
colimn 'm' is blank.
But I have autofilter command using VBA code and I want the rows to be
counted based on the output of the filter results.
Example column 'N' has a filter where the selection is 'A' & 'B'.
I want the my formula
COUNT(IF((TRIM($C$4:$C$96)="P")*ISBLANK($M$4:$M$96 ),$A$4:$A$96)) to count
only filtered rows if the filter is used






All times are GMT +1. The time now is 04:25 AM.

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