Choose chart from drop down list

whitjm4

New Member
Joined
Jan 17, 2018
Messages
5
I have 4 different charts to display on a page. I can only display one at a time due to the volume of data. A dashboard with all charts would be too small to read. I would like to use a drop down list to allow the reader to choose the chart to be viewed. I've worked with drop downs for lists but not changing a chart.
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
The charts will be placed on top of each other then you can use the dropdown list to "bring to front". You will add this code to the sheet's Change code (right click the tab, VIEW CODE and paste this in)
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim chartfront As String
on error goto 0
If Target.Address = "$A$1" Then
chartfront = Target
ActiveSheet.ChartObjects(chartfront).Activate
    ActiveSheet.Shapes(chartfront).ZOrder msoBringToFront
End If
End Sub

In my code, change $A$1 to the cell where you put the dropdown list.
 
Upvote 0

Forum statistics

Threads
1,223,162
Messages
6,170,431
Members
452,326
Latest member
johnshaji

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