LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default Count if function

If you are going to use a filter then you don't need a formula like this,
filter on blanks in M and P in C then just count the visible cells in A

=SUBTOTAL(2,A4:A96)

If you still want a formula and all your data starts in row 4 with headers
in 3 you can use

=SUMPRODUCT(--(ISBLANK($M$4:$M$96)),--(TRIM($C$4:$C$96)="P"),--(ISNUMBER($A$4:$A$96)),SUBTOTAL(3,OFFSET($A$4,ROW( $A$4:$A$96)-MIN(ROW($A$4:$A$96)),,)))


although I would probably change remove isblank and use range=""


=SUMPRODUCT(--($M$4:$M$96=""),--(TRIM($C$4:$C$96)="P"),--(ISNUMBER($A$4:$A$96)),SUBTOTAL(3,OFFSET($A$4,ROW( $A$4:$A$96)-MIN(ROW($A$4:$A$96)),,)))

This formula can be entered normally as opposed to your COUNT formula


--


Regards,


Peo Sjoblom


"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))

But I have autofilter command and I want the rows to be counted based on
the
output of the filter results. But this formula always gives the output os
the
rows.

Please help



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
row count function Daniel Charts and Charting in Excel 1 June 14th 07 01:40 PM
Count function L.T. Excel Discussion (Misc queries) 4 January 20th 07 03:40 AM
Count Function Portuga Excel Discussion (Misc queries) 4 May 31st 06 02:08 PM
which count function? y_not Excel Discussion (Misc queries) 6 March 23rd 06 07:24 AM
i need help with the "count" function kippercat Excel Worksheet Functions 1 March 9th 05 09:58 AM


All times are GMT +1. The time now is 05:55 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"