Hi,
I am trying to create a multiple series bar chart in an Excel sheet. I got the following from recording a macro.
ActiveChart.SeriesCollection(1).Values = _
"=('Budget Report'!R10C3,'Budget Report'!R14C3,'Budget Report'!R18C3,'Budget Report'!R22C3)"
ActiveChart.SeriesCollection(2).Values = _
"=('Budget Report'!R11C3,'Budget Report'!R15C3,'Budget Report'!R19C3,'Budget Report'!R23C3)"
I would like to make the Cells reference used in Values property into a variable, so that it changes dynamically. My code below gives me an error. Please help!
ActiveChart.SeriesCollection(i).Values = wBudgetRpt.Cells(10, 3), wBudgetRpt.Cells(14, 3), wBudgetRpt.Cells(18, 3), wBudgetRpt.Cells(22, 3)
I am trying to create a multiple series bar chart in an Excel sheet. I got the following from recording a macro.
ActiveChart.SeriesCollection(1).Values = _
"=('Budget Report'!R10C3,'Budget Report'!R14C3,'Budget Report'!R18C3,'Budget Report'!R22C3)"
ActiveChart.SeriesCollection(2).Values = _
"=('Budget Report'!R11C3,'Budget Report'!R15C3,'Budget Report'!R19C3,'Budget Report'!R23C3)"
I would like to make the Cells reference used in Values property into a variable, so that it changes dynamically. My code below gives me an error. Please help!
ActiveChart.SeriesCollection(i).Values = wBudgetRpt.Cells(10, 3), wBudgetRpt.Cells(14, 3), wBudgetRpt.Cells(18, 3), wBudgetRpt.Cells(22, 3)