Hello!
I am trying to filter a pivot table using hover via a hyperlink. I did post about this yesterday but have revised my method.
I am using a hyperlink technique for changing a cell value as found on Chandoo.org. I have combined this with a Microsoft Pivot Table example that filters a Pivot Table based upon the values in cell D2 (attached example).
The code that powers the hyperlink is:
As you hover over C18, D18, E18, it will update the text in D2. This does not trigger a change in the Pivot Table. If you type text in D2 then the Pivot Table updates.Public Function highlightSeries(seriesName As Range) Range("RegionFilterRange") = seriesName.Value End Function
Private Sub Workbook_SheetChange does not seem triggered by the update by highlighSeries.
I've been going round in circles with different methods and can't get it work. Any ideas?
Thanks
Last edited by jim-nf; 09-14-2011 at 12:51 PM.
I've updated the code highlightSeries:
This calls the Public Sub but as with other approaches I have tried it seems that a Function called from a hyperlink cannot update the visibility of PIvotItems. It seems to be able to complete all other steps.Public Function highlightSeries(seriesName As Range) Range("RegionFilterRange") = seriesName.Value Call ThisWorkbook.UpdatePivotFieldFromRange("RegionFilterRange", "PivotTable1", "Region") End Function
Is there any way to set the visibility of the items?
I've tried adding :
But this makes no difference.Field.AutoSort xlManual, Field
Last edited by jim-nf; 09-14-2011 at 03:18 PM. Reason: Updated with v2 attachment
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks