Hiding and unhiding a chart based on data

Elqueso

New Member
Joined
Feb 5, 2010
Messages
6
Hello,
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p> </o:p>
I’m trying to hide a pie chart based on data that is selected by a drop down menu.
<o:p> </o:p>
I currently have a chart with Customer and Sales data. This is the primary way for me to display information, and I have a dropdown menu to select different customers which alters this chart. The problem I’m having is that for some customers there is additional data. i.e. retail vs commercial. I have displayed this breakdown with a secondary chart (pie chart), but not all customers have this breakdown. I’ve inserted “IF” formulas to hide/unhide the data, but I would like to know if there is a way to hide/unhide the secondary chart.
<o:p> </o:p>
I read that we are not allowed to post email addresses, but if someone wants to send me a PM, I will gladly send the spreadsheet.
<o:p> </o:p>
Any help would be appreciated.
<o:p> </o:p>
<o:p>thanks </o:p>
<o:p></o:p>
I'm currently using Excel 2003 in Windows XP<o:p></o:p>
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
This code will hide the first chart on the active worksheet:
ActiveSheet.ChartObjects(1).Visible = xlHidden

This code will make it visible;
ActiveSheet.ChartObjects(1).Visible = xlVisible
 
Upvote 0

Forum statistics

Threads
1,224,592
Messages
6,179,789
Members
452,942
Latest member
VijayNewtoExcel

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top