How to create Drop down list in Chart?


K

Khaled

I would like to Create A chart i Excel with Drop Down list appears on the
Chart to be able to select the data to be plotted on the chart.
 
Ad

Advertisements

J

Joel

You can't use a drop down box but you can use an Input Box. This macro will
work if you already have a chart on the worksheet. Change Chart Name "Chart
1" and sheet name as required.

Sub GetChart()
'
Set ChartArea = Application.InputBox( _
prompt:="Select Chart Range", Type:=8)

ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.ChartArea.Select
ActiveChart.SetSourceData _
Source:=Sheets("Sheet2").Range(ChartArea.Address)
End Sub
 
Ad

Advertisements

S

Suleman Peerzade

HI,

You can use the pivot table which can do the needfull in your case. It gives
you the drop down arrow to select and also the chart
Menu bar >> Data>>Pivot table
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top