Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
CliffD
 
Posts: n/a
Default How do I show number of records that meet criteria filter

I have a large spreadsheet containing several hundred rows of data. I want
to filter the list and I want to be able to show the number of records that
match the filter criteria. For example, un-filtered the total number of
records in the list is displayed and, when filtered, the number of records in
the list that match the criteria is displayed.

Can onyone help me please?

Kind regards,

Cliff
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Cliff,

Here is a little function that returns the count, and works from VBA. Just
pass the header cell to the function

Function FilteredListCount(rng As Range)
Dim iLastrow As Long
Dim rngTemp As Range
iLastrow = Cells(Rows.Count, rng.Column).End(xlUp).Row
Set rngTemp = rng.Offset(1, 0).Resize(iLastrow - 1)
FilteredListCount = rngTemp.SpecialCells(xlCellTypeVisible).Count
End Function



--

HTH

RP
(remove nothere from the email address if mailing direct)


"CliffD" wrote in message
...
I have a large spreadsheet containing several hundred rows of data. I

want
to filter the list and I want to be able to show the number of records

that
match the filter criteria. For example, un-filtered the total number of
records in the list is displayed and, when filtered, the number of records

in
the list that match the criteria is displayed.

Can onyone help me please?

Kind regards,

Cliff



  #3   Report Post  
Dave Peterson
 
Posts: n/a
Default

If you can pick out a column that always has something in it, you can use:

=subtotal(3,a2:a99)



CliffD wrote:

I have a large spreadsheet containing several hundred rows of data. I want
to filter the list and I want to be able to show the number of records that
match the filter criteria. For example, un-filtered the total number of
records in the list is displayed and, when filtered, the number of records in
the list that match the criteria is displayed.

Can onyone help me please?

Kind regards,

Cliff


--

Dave Peterson
  #4   Report Post  
Jim May
 
Posts: n/a
Default

There is also:
subtotal(3,A2:A100) << 3 -For the count

"Bob Phillips" wrote in message
...
Cliff,

Here is a little function that returns the count, and works from VBA. Just
pass the header cell to the function

Function FilteredListCount(rng As Range)
Dim iLastrow As Long
Dim rngTemp As Range
iLastrow = Cells(Rows.Count, rng.Column).End(xlUp).Row
Set rngTemp = rng.Offset(1, 0).Resize(iLastrow - 1)
FilteredListCount = rngTemp.SpecialCells(xlCellTypeVisible).Count
End Function



--

HTH

RP
(remove nothere from the email address if mailing direct)


"CliffD" wrote in message
...
I have a large spreadsheet containing several hundred rows of data. I

want
to filter the list and I want to be able to show the number of records

that
match the filter criteria. For example, un-filtered the total number of
records in the list is displayed and, when filtered, the number of
records

in
the list that match the criteria is displayed.

Can onyone help me please?

Kind regards,

Cliff





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
Extract multiple records matching criteria from list William DeLeo Excel Worksheet Functions 12 June 30th 05 02:35 PM
in excel how can I get the number to show instead to #value in th. excel Excel Worksheet Functions 2 January 30th 05 07:29 PM
#VALUE in cell but pop up function box show right number Ted Dalton Excel Discussion (Misc queries) 1 December 14th 04 03:15 PM
Why does the formula result show a number but the screen shows ze. Jam-Du Excel Worksheet Functions 2 November 12th 04 09:07 PM
How do I convert 300616a to show as a number 303616? SusanK Excel Worksheet Functions 3 November 9th 04 08:40 AM


All times are GMT +1. The time now is 11:35 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"