PDA

View Full Version : Custom Pivot Table Drilldowns in Excel 2007



PegLegPete
01-30-2009, 03:23 PM
So I have a big complicated pivottable in Excel 2007. One of the new features in '07 is the ability to double-click one of the data elements in a pivottable, which then "drillsdown" - aka it opens a new sheet displaying the recordset which is the source for that data.

One of my requirements is the columns in the "drilldown" sheet need to be renamed differently depending on which summary item the user clicks on in the pivottable. Or in other words, the pivot table summarizes data based on ProductType (one of the categories, among others), and each ProductType has a different renaming scheme.

So if I can determine the ProductType of the row they clicked on, I can alter my renaming scheme. How do I determine that ProductType?

PivotCell and RowItems seem to be the right path to go down, but I can't get anything to work properly.

I'm also not so sure if I can even access that information, because the event which handles generating that detail worksheet is not obvious to me. And if I can't access the event, how would I even know what cell the user clicked on?

Any ideas? Thanks for reading and thanks in advance to any one that replies.