ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Charts and Charting in Excel (https://www.excelbanter.com/charts-charting-excel/)
-   -   Click on graph bar to execute a double-click in a pivot table cell (https://www.excelbanter.com/charts-charting-excel/38115-click-graph-bar-execute-double-click-pivot-table-cell.html)

[email protected]

Click on graph bar to execute a double-click in a pivot table cell
 
Excel 2002. I have a group of 6 different stacked bar charts built from
parts of a pivot table. Each graph has several bars with each bar
having sections for categories "10", "20", "30", "40", and "50". The
graphs can be direct linked to the pivot table (as a pivot chart) or
linked to an intermediate sheet looksup the data from the pivot table.
I want to be able to click (double or single click) on a graph bar or
section of a bar and execute the same action (.ShowDetail) that occurs
when you double-click on a cell in the pivot table (print the
corresponding sub-set of the data on a new sheet).

To do this I need to determine which graph bar (or section of the
stacked bar) was clicked and relate that to the appropriate cell in the
pivot table. Then I can select that cell in the pivot table and execute
"Selection.ShowDetail".


Jon Peltier

Bill -

A pivot chart has no special events that a regular chart does not, but
it appears that you can capture the pivot chart's regular events. I
wrote a recent article on events in Excel Charts, which might help you:

http://www.computorcompanion.com/LPMArticle.asp?ID=221

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______


wrote:

Excel 2002. I have a group of 6 different stacked bar charts built from
parts of a pivot table. Each graph has several bars with each bar
having sections for categories "10", "20", "30", "40", and "50". The
graphs can be direct linked to the pivot table (as a pivot chart) or
linked to an intermediate sheet looksup the data from the pivot table.
I want to be able to click (double or single click) on a graph bar or
section of a bar and execute the same action (.ShowDetail) that occurs
when you double-click on a cell in the pivot table (print the
corresponding sub-set of the data on a new sheet).

To do this I need to determine which graph bar (or section of the
stacked bar) was clicked and relate that to the appropriate cell in the
pivot table. Then I can select that cell in the pivot table and execute
"Selection.ShowDetail".


[email protected]


Jon Peltier wrote:
Bill -

A pivot chart has no special events that a regular chart does not, but
it appears that you can capture the pivot chart's regular events. I
wrote a recent article on events in Excel Charts, which might help you:

http://www.computorcompanion.com/LPMArticle.asp?ID=221

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______


wrote:

Excel 2002. I have a group of 6 different stacked bar charts built from
parts of a pivot table. Each graph has several bars with each bar
having sections for categories "10", "20", "30", "40", and "50". The
graphs can be direct linked to the pivot table (as a pivot chart) or
linked to an intermediate sheet looksup the data from the pivot table.
I want to be able to click (double or single click) on a graph bar or
section of a bar and execute the same action (.ShowDetail) that occurs
when you double-click on a cell in the pivot table (print the
corresponding sub-set of the data on a new sheet).

To do this I need to determine which graph bar (or section of the
stacked bar) was clicked and relate that to the appropriate cell in the
pivot table. Then I can select that cell in the pivot table and execute
"Selection.ShowDetail".



[email protected]

Thanks Jon...

Excellent article and it provided just what I needed.

By the way, the article was very well written and easy to understand.
Have you published any books on excel?


Jon Peltier

Bill -

Thanks for the note, I'm glad the article was helpful. I haven't written
any books, just a few web pages now and then. Check the site in my sig.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______


wrote:

Thanks Jon...

Excellent article and it provided just what I needed.

By the way, the article was very well written and easy to understand.
Have you published any books on excel?



All times are GMT +1. The time now is 02:37 PM.

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