I have a sheet (Dashboard) that has multiple Pareto charts, another sheet (Data) brings in the range for each chart via a formula in standard $A$1:$B$2 format.
how do I use these ranges from the Sheet "Data" in the Pareto charts in the "Dashboard"? Chart name is in Data B4 Chart Range is in Data C4 I have code for each chart for troubleshooting below is one from a single chart
Sub FirstChart()
Dim FirstChartName As String
Dim FirstChartRange As Range
FirstChartName = Sheets("Data").Range("B4")
Set FirstChartRange = Worksheets("Data").Range(Sheets("Data").Range("C4").Value)
Sheets("Dashboard").ChartObjects("FirstChart").Activate
ActiveChart.ChartArea.Select
ActiveChart.HasTitle = True
ActiveChart.ChartTitle.Text = FirstChartName
ActiveChart.SetSourceData Source:=FirstChartRange
End Sub
Thanks in advance.
UPDATE: Thanks to @coross24 and @WIL. i have uploaded the file based on their answers to https://gofile.io/d/8HfjQv