Drill-Down Pivot Macro

Drill-Down Pivot Macro

Post by japearlma » Wed, 07 Jul 2004 22:55:48

Is there a manual way to drill down to data in a pivot table other
than double clicking? I'm trying to write a macro that drills down to
the data under the active cell, but using the double click would
change the location of the active cell. Any ideas???

Thanks in advance.....

Drill-Down Pivot Macro

Post by Debra Dalg » Thu, 08 Jul 2004 04:29:21

Another way to do it manually is to choose
PivotTable> Group and Show Detail>Show Detail
but that will also leave the detail sheet activated.

Or, via code:

Sub ActiveCellDrillDown()
Dim rng As Range
Set rng = ActiveCell

With rng
.ShowDetail = True
End With

End Sub

Debra Dalgleish
Excel FAQ, Tips & Book List