ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Drill-Down Pivot Macro (https://www.excelbanter.com/excel-programming/303327-drill-down-pivot-macro.html)

Jay[_18_]

Drill-Down Pivot Macro
 
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.....

Debra Dalgleish

Drill-Down Pivot Macro
 
Another way to do it manually is to choose
PivotTable Group and Show DetailShow 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


Jay wrote:
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.....



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html



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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com