View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] carl.gentry@gmail.com is offline
external usenet poster
 
Posts: 1
Default Macro to Outline based on Indent Level

I have a worksheet with column B being titles that are indented to
outline the list (I even have the indent level a column). I would
like to outline this with VBA with a macro, so I can hide and show the
details as necessary. Can anyone help me with how to set up the loops
to search and determine the first and last rows of the group. My
summary row is above.

I know how to group and outline rows manually and have recorded it.
The issue is I want to be able to automate the process for future
versions. I also add and delete rows which causes outlining errors.

Example
Row Description indent LevelMore columns
1 Desc 1 0
1 Desc 1 1
1 Desc 1 2
1 Desc 1 2
1 Desc 1 1
1 Desc 1 2
1 Desc 1 2
1 Desc 1 2
1 Desc 1 0
1 Desc 1 1
1 Desc 1