Drill-Down Pivot Macro

J

Jay

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.....
 
D

Debra Dalgleish

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
.Parent.Activate
.Activate
End With

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top