Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Count Cells
Hi
If when I apply a Filter it gives me 5 records, or 7, or whatever number of records. What code should I write in order to give me the number of records (rows) , 5, 7 whatever thanks Pedro |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Count Cells
Pedro,
Will this help? Note that this procedure assumes that the first column of the filtered range doesn't contain any blank cells. Sub ShowNumberOfRecords() Dim rng As Range Set rng = ActiveSheet.AutoFilter.Range.Columns(1) MsgBox Application.WorksheetFunction.Subtotal(3, rng) - 1 End Sub -- Ture Magnusson Microsoft MVP - Excel Karlstad, Sweden "Pedro" wrote in message ... Hi If when I apply a Filter it gives me 5 records, or 7, or whatever number of records. What code should I write in order to give me the number of records (rows) , 5, 7 whatever thanks Pedro |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Count Cells
Have a look in HELP index for SUBTOTAL
-- Don Guillett SalesAid Software "Pedro" wrote in message ... Hi If when I apply a Filter it gives me 5 records, or 7, or whatever number of records. What code should I write in order to give me the number of records (rows) , 5, 7 whatever thanks Pedro |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Count Cells
Another (works with a column where there may be missing values)
msgbox ActiveSheet.AutoFilter.Range.Columns(1) _ .SpecialCells(xlvisible).count-1 -- Regards, Tom Ogilvy Pedro wrote in message ... Hi If when I apply a Filter it gives me 5 records, or 7, or whatever number of records. What code should I write in order to give me the number of records (rows) , 5, 7 whatever thanks Pedro |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to count#cells w/= value in other column and not count blank c | Excel Worksheet Functions | |||
count cells, then reset count when value in another cell changes | Excel Worksheet Functions | |||
Count cells with numbers and ignore cells with errors | Excel Discussion (Misc queries) | |||
How do I count cells with text but ignore cells with spaces? | Excel Discussion (Misc queries) | |||
HOW TO FORMATE CELLS TO COUNT CELLS WITH A FILL COLOR? | New Users to Excel |