identify first row after subtotals

G

Guest

Hello,

I would like to identify the number of the first row AFTER I've displayed
the second row level of my subtotals. (ActiveSheet.Outline.ShowLevels
RowLevels:=2)

Example :
1 Name Points
10 Bob Total 30
17 Tim Total 40
25 Tom Total 50
26 Grand Total 120
The number of the first row here would be 10.
To retrieve the last row I use : ActiveSheet.UsedRange.Rows.Count.

Thank you in advance for any help.
Nicodemus
 
G

Guest

Be careful with your last row thing, it only works if Row 1 has something in
it. I would recommend that you use this instead:
LastRow = ActiveSheet.UsedRange.Cells _
(ActiveSheet.UsedRange.Rows.Count,1).Row
 
G

Guest

Thank you for the advice.
The first row will always contain data.
The most important for me is to identify the first row ;)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top