PC Review


Reply
Thread Tools Rate Thread

Collapsing rows

 
 
=?Utf-8?B?Y3VyaW91cw==?=
Guest
Posts: n/a
 
      11th Jul 2007
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 With Quote
 
 
 
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      11th Jul 2007
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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Collapsing (hiding) rows Ashley Microsoft Excel Misc 0 21st May 2009 06:53 PM
collapsing rows together Chris Microsoft Excel Worksheet Functions 1 14th Nov 2008 08:19 AM
collapsing rows Jim S. Microsoft Excel Worksheet Functions 5 5th Dec 2007 10:17 PM
Collapsing Rows =?Utf-8?B?RWRDUEE=?= Microsoft Excel Misc 2 22nd Sep 2005 01:19 AM
Re: Expanding / Collapsing Rows RagDyer Microsoft Excel Misc 0 19th Jun 2004 03:44 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:45 PM.