Hi
I have the below VBA that works with a pivottable of a fixed number of rows.
What i need is code that will allow drilldown, show detail cell to be selected on a pivot table of any length.
Currently the VBA is set to cell "I33".
I am assuming that this is a relatively common vba request
Code
Sub Drill_on_pivot_andCopy()
Dim cc As Long
Dim pt As PivotTable
cc = Sheets("Line Item").Range("B10").Value
pt.RefreshTable
Sheets("Line Item").Range("I33").ShowDetail = True
ActiveSheet.Name = cc & " Drl " & Format(Now, "mm-ss")
ActiveSheet.Move After:=Sheets("Line Item")
Cells(1).Select
Sheet14.Activate
End Sub
Display More
Thanks
Matt