Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Count of results in AutoFilter

Hello all,

I have an autofilter running through a macro - but I would
like to retrieve the number of rows that met the filter
criteria.

Is there a .count property (or something similar) on the
AutoFilter object? If not, is there a countif(visible)
formula I could use directly in the worksheet?

Thanks!!!!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Count of results in AutoFilter

set rng = Activesheet.autofilter.Range.Columns(1)
set rng1 = rng.SpecialCells(xlVisible)
msgbox rng1.Count - 1 ' subtract the header

--
Regards,
Tom Ogilvy

"andrew" wrote in message
...
Hello all,

I have an autofilter running through a macro - but I would
like to retrieve the number of rows that met the filter
criteria.

Is there a .count property (or something similar) on the
AutoFilter object? If not, is there a countif(visible)
formula I could use directly in the worksheet?

Thanks!!!!



  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Count of results in AutoFilter

Perfect.

Thanks!

-----Original Message-----
set rng = Activesheet.autofilter.Range.Columns(1)
set rng1 = rng.SpecialCells(xlVisible)
msgbox rng1.Count - 1 ' subtract the header

--
Regards,
Tom Ogilvy

"andrew" wrote in

message
...
Hello all,

I have an autofilter running through a macro - but I

would
like to retrieve the number of rows that met the filter
criteria.

Is there a .count property (or something similar) on the
AutoFilter object? If not, is there a countif(visible)
formula I could use directly in the worksheet?

Thanks!!!!



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default Count of results in AutoFilter

in the worksheet, use the subtotal function with function 2 for numeric and
3 for alpha data.

In a list of alpha data, add beneath the list the function
=SUBTOTAL(3,range)

Steve
"andrew" wrote in message
...
Hello all,

I have an autofilter running through a macro - but I would
like to retrieve the number of rows that met the filter
criteria.

Is there a .count property (or something similar) on the
AutoFilter object? If not, is there a countif(visible)
formula I could use directly in the worksheet?

Thanks!!!!



Reply
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
emailing autofilter results Dianeg Excel Worksheet Functions 3 January 19th 10 10:02 AM
Average over autofilter results QB Excel Worksheet Functions 4 September 30th 09 04:17 PM
Autofilter results Ben Wunderin Excel Discussion (Misc queries) 3 December 2nd 08 12:31 AM
with Autofilter on, display count results in lower left corner wit jsky Excel Worksheet Functions 1 October 3rd 05 10:46 PM
Strange Results with Autofilter Joyce Excel Discussion (Misc queries) 1 January 17th 05 02:42 AM


All times are GMT +1. The time now is 09:43 PM.

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

About Us

"It's about Microsoft Excel"