ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   AutoFilter - How to determine number of records found (https://www.excelbanter.com/excel-programming/376591-autofilter-how-determine-number-records-found.html)

JRB

AutoFilter - How to determine number of records found
 
I would like to display a message containing the number of records found by
an autofilter run from vba

How do I count the records ?

Regards & TIA



Gary Brown

AutoFilter - How to determine number of records found
 
Use ...
MsgBox Application.WorksheetFunction.Subtotal(3, Range("A:A"))
where A:A is the range you want to count.
--
HTH,
Gary Brown

If this post was helpful to you, please select ''YES'' at the bottom of the
post.



"JRB @eclipse.co.uk" wrote:

I would like to display a message containing the number of records found by
an autofilter run from vba

How do I count the records ?

Regards & TIA




JRB

AutoFilter - How to determine number of records found
 
Exactly what I needed - Muchly Grateful

BTW - No 'Yes' at bottom of the post

"Gary Brown" wrote in
message ...
Use ...
MsgBox Application.WorksheetFunction.Subtotal(3, Range("A:A"))
where A:A is the range you want to count.
--
HTH,
Gary Brown

If this post was helpful to you, please select ''YES'' at the bottom of
the
post.



"JRB @eclipse.co.uk" wrote:

I would like to display a message containing the number of records found
by
an autofilter run from vba

How do I count the records ?

Regards & TIA






Gary Brown

AutoFilter - How to determine number of records found
 
There's no 'Was this post helpful to you? YES NO' at the bottom of the post?
Son of a gun!
Thanks for the info.
--
Sincerely,
Gary Brown




"JRB @eclipse.co.uk" wrote:

Exactly what I needed - Muchly Grateful

BTW - No 'Yes' at bottom of the post

"Gary Brown" wrote in
message ...
Use ...
MsgBox Application.WorksheetFunction.Subtotal(3, Range("A:A"))
where A:A is the range you want to count.
--
HTH,
Gary Brown

If this post was helpful to you, please select ''YES'' at the bottom of
the
post.



"JRB @eclipse.co.uk" wrote:

I would like to display a message containing the number of records found
by
an autofilter run from vba

How do I count the records ?

Regards & TIA








All times are GMT +1. The time now is 02:18 PM.

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