Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default identify first row after subtotals

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 272
Default identify first row after subtotals

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
--
Charles Chickering

"A good example is twice the value of good advice."


"Nicodemus" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default identify first row after subtotals

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

"Nicodemus" wrote:

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

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
Subtotals problem: Excel 2003 (not, AFAIK, the nested subtotals bug) AndyCotgreave Excel Discussion (Misc queries) 3 October 24th 07 11:32 AM
Original subtotals should not be within nested subtotals in excel Mirage Excel Worksheet Functions 1 June 6th 07 01:37 AM
Subtotals: Nested subtotals below higher subtotal RobN Excel Discussion (Misc queries) 1 July 20th 06 09:04 PM
Problem with nested subtotals, placing secondary subtotals BELOW . Dawn Cameron Excel Discussion (Misc queries) 1 June 3rd 05 10:13 PM
why are nested subtotals coming out below outer subtotals? Hendy Excel Worksheet Functions 2 January 18th 05 08:09 PM


All times are GMT +1. The time now is 04:04 AM.

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"