Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Counting number of grouped/outlined rows
Hello,
I use the outline/group-functionality very extensively so that I always use 3-5 levels of them. Now in my program it is necessary for me to know how many rows are part of an outline. So I just closed the group, counted the number of visible rows, opened the group and again counted the number of rows - the difference then is the number of rows inside the group/outline. But now I recognized that it no more works if inside of that group again groups exist which are closed. Then all the rows of this group/outline are just counted as one row, but not the number of all the rows inside of it. So is there are any possibility to get the number of rows inside one group/outline easily? I know, I could open all groups/outlines inside the one I have to count recursively, but due to my huge worksheets this will take quite long so that this is nearly impossible for me. Does anyone have any idea or just a hint what I could do? Thanks in advance. Dirk |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Counting number of grouped/outlined rows
Dirk Flakowski wrote:
So is there are any possibility to get the number of rows inside one group/outline easily? Function NumberOfRowsInOutlineLevel(Level As Integer) As Long Dim R As Range Dim L As Long For Each R In ActiveSheet.UsedRange.EntireRow.Rows If R.OutlineLevel = Level Then L = L+1 Next NumberOfRowsInOutlineLevel = L End Function Bill Manville MVP - Microsoft Excel, Oxford, England No email replies please - reply in newsgroup |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Counting number of rows | New Users to Excel | |||
Counting number of rows | New Users to Excel | |||
Grouped/outlined data only graphs when visible | Charts and Charting in Excel | |||
Can I sum an outlined Excel sheet and ignore collapsed rows? | Excel Worksheet Functions | |||
sorting a sheet with outlined rows | Excel Discussion (Misc queries) |