PC Review


Reply
Thread Tools Rate Thread

Count rows after filter

 
 
Learn-more
Guest
Posts: n/a
 
      4th Jul 2008
I want to count how many rows are left in the worksheet after I used filter
and some rows had been hidden. COUNTA give me all rows and not the one after
filter.
Are there any function can do that or need to use VBA?
Thank you.
 
Reply With Quote
 
 
 
 
Héctor Miguel
Guest
Posts: n/a
 
      4th Jul 2008
hi, anonymous !

> I want to count how many rows are left in the worksheet after I used filter and some rows had been hidden.
> COUNTA give me all rows and not the one after filter.
> Are there any function can do that or need to use VBA?


subtotal(... worksheet-function only tracks visible cells/rows after any autofilter criteria so...

counting numbers: =subtotal(2,<filtered range>)
counting text/any: =subtotal(3,<filtered range>)

hth,
hector.


 
Reply With Quote
 
Learn-more
Guest
Posts: n/a
 
      4th Jul 2008
Hello,
Thank you. It work out good. I know subtotal can sum but forget/not realize
it can do counting etc too.

Thanks a lot.
Learn-more

"Héctor Miguel" wrote:

> hi, anonymous !
>
> > I want to count how many rows are left in the worksheet after I used filter and some rows had been hidden.
> > COUNTA give me all rows and not the one after filter.
> > Are there any function can do that or need to use VBA?

>
> subtotal(... worksheet-function only tracks visible cells/rows after any autofilter criteria so...
>
> counting numbers: =subtotal(2,<filtered range>)
> counting text/any: =subtotal(3,<filtered range>)
>
> hth,
> hector.
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
datatable rows count and dataview count differ John Hui Microsoft ADO .NET 4 3rd Aug 2010 10:26 PM
Excel 2003: Can you filter rows much the same way you filter colu. =?Utf-8?B?SmVmZg==?= Microsoft Access 2 6th Apr 2005 02:00 AM
Re: how do i count rows, and count them by color or a highlight? blue. Frank Kabel Microsoft Excel Worksheet Functions 0 9th Sep 2004 10:05 PM
I am adding a new row to the datagrid dynamically but if i use the Count property of Item it is not showing the count of the new rows being added Praveen Balanagendra via .NET 247 Microsoft ASP .NET 2 6th Jun 2004 08:16 AM
Count Rows When Using Auto-Filter Nick Microsoft Excel Misc 1 6th Oct 2003 03:38 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:34 PM.