View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
UB UB is offline
external usenet poster
 
Posts: 120
Default 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