Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default Collapsing rows

I am writing categories of data (a category covers several rows) to an Excel
sheet, one category after another. I would like to collapse the rows
containing a category when all category data are entered. So the question is
how to programmatically collapse a number of rows after filling them with
data.

Thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Collapsing rows

Range("A10").Resize(8).EntireRow.Hidden = True

just to demo:

? Range("A10").Resize(8).EntireRow.Address
$10:$17


or maybe something like

ActiveCell.offset(-7,0).Resize(7).EntireRow.Hidden = True

demo'd again:
? activeCell.Address
$A$19
? ActiveCell.offset(-7,0).Resize(7).EntireRow.Address
$12:$18

so I am sitting in cell A19 after making 7 entries in cells A12:A18. Run
the macro and they are hidden and I begin the new category in A19.



--
Regards,
Tom Ogilvy


"curious" wrote:

I am writing categories of data (a category covers several rows) to an Excel
sheet, one category after another. I would like to collapse the rows
containing a category when all category data are entered. So the question is
how to programmatically collapse a number of rows after filling them with
data.

Thanks

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
Collapsing (hiding) rows Ashley Excel Discussion (Misc queries) 2 May 23rd 09 04:20 PM
collapsing rows together Chris Excel Worksheet Functions 1 November 14th 08 08:19 AM
collapsing rows Jim S. Excel Worksheet Functions 5 December 5th 07 10:17 PM
Expanding / Collapsing rows GreenMonster Excel Discussion (Misc queries) 3 November 2nd 06 09:32 PM
Collapsing Rows EdCPA Excel Discussion (Misc queries) 2 September 22nd 05 01:19 AM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"