View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bill Manville Bill Manville is offline
external usenet poster
 
Posts: 473
Default 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