Microsoft KB Archive/68631

{| = Showing Detail Only of an Excel Outline =
 * width="100%"|

Last reviewed: November 2, 1994

Article ID: Q68631

SUMMARY
Microsoft Excel's outlining feature does not allow you to show only detail items when hiding summary data. However, this function can be performed by a macro.

MORE INFORMATION
The following macro demands a number input from you, and then displays only those rows in the worksheet that are at that level of outlining. All other items will be hidden.

A1: =SET.NAME(&quot;Level&quot;,INPUT(&quot;Level to show&quot;,1)) A2: =SELECT.LAST.CELL A3: =SET.NAME(&quot;Maxrow&quot;,ROW(ACTIVE.CELL)) A4: =SELECT(&quot;r1c1&quot;) A5: =FOR(&quot;count&quot;,1,Maxrow) A6: =GET.CELL(28,ACTIVE.CELL) A7: =IF(A6<>Level,ROW.HEIGHT(,ACTIVE.CELL,FALSE,1),          ROW.HEIGHT(,ACTIVE.CELL,,2)) A8: =SELECT(&quot;r[1]c&quot;) A9: =NEXT A10: =RETURN To make the macro work on columns instead of rows, the following modifications have to be made: A3: =SET.NAME(&quot;Maxrow&quot;,COLUMN(ACTIVE.CELL)) A6: =GET.CELL(29,ACTIVE.CELL) A7: =IF(A6<>Level,COLUMN.WIDTH(,ACTIVE.CELL,FALSE,1),          COLUMN.WIDTH(,ACTIVE.CELL,,2)) A8: =SELECT(&quot;rc[1]&quot;)