Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Excel VBA Expand/Collapse with Subtotals

I am using Excel 2000 with Microsoft Windows 2000.

I created a spreadsheet with double subtotals on each of the three
tabs.
I know that when I click on the plus signs off to the left, it
collapses the subtotals
so I can see the detail.

How do I do this in code?

I just want to collapse specific numbers in my subtotals.

I have to do this many times each day manually, so the code will be a
big help!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Excel VBA Expand/Collapse with Subtotals

Worksheets("Sheet1").Outline _
.ShowLevels rowLevels:=3, columnLevels:=1

or

Worksheets("Sheet1").Rows(2).OutlineLevel = 1


See help on these methods for details.

--
Regards,
Tom Ogilvy


wrote in message
oups.com...
I am using Excel 2000 with Microsoft Windows 2000.

I created a spreadsheet with double subtotals on each of the three
tabs.
I know that when I click on the plus signs off to the left, it
collapses the subtotals
so I can see the detail.

How do I do this in code?

I just want to collapse specific numbers in my subtotals.

I have to do this many times each day manually, so the code will be a
big help!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Excel VBA Expand/Collapse with Subtotals

Tom:

Could you please give me an example how to do this for a cell in
column a with the value "11 Total", so it would expand that group's
subtotals, so it just shows all the values in column c with "total" as
part of a value?

The amount of rows vary days to day, so the column with the total I am
looking for
will probably not be in the same cell each time.

Right now I am searching all the cells in column A, finding the
specific number I want, then
I search on column c for the corresponding cells with "total" in them
and unhide
those lines only. This can be very slow.


On Feb 18, 4:02 pm, "Tom Ogilvy" wrote:
Worksheets("Sheet1").Outline _
.ShowLevels rowLevels:=3, columnLevels:=1

or

Worksheets("Sheet1").Rows(2).OutlineLevel = 1

See help on these methods for details.

--
Regards,
Tom Ogilvy

wrote in message

oups.com...

I am using Excel 2000 with Microsoft Windows 2000.


I created a spreadsheet with double subtotals on each of the three
tabs.
I know that when I click on the plus signs off to the left, it
collapses the subtotals
so I can see the detail.


How do I do this in code?


I just want to collapse specific numbers in my subtotals.


I have to do this many times each day manually, so the code will be a
big help!



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
Programming Outlines (expand/collapse rows) in Excel [email protected] Excel Programming 0 January 17th 07 10:33 PM
expand and collapse button with subtotals TUNGANA KURMA RAJU Excel Discussion (Misc queries) 1 May 6th 06 01:18 PM
how to use collapse/ expand fuction in excel like outlook Shahid Excel Discussion (Misc queries) 0 November 17th 05 09:20 PM
How do I create columns that expand and collapse in Excel? Curious Excel ER Excel Worksheet Functions 2 June 11th 05 12:31 AM
format columns to collapse and expand in excel bob sacco Excel Discussion (Misc queries) 7 April 23rd 05 02:29 AM


All times are GMT +1. The time now is 10:39 PM.

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"