![]() |
adding data to a chart
I am trying to add a data series to an existing chart.
I have defined k in the program and want to select cols k+7 and k+2 as the data form the sheet "Data" to add to the chart. I have: ActiveChart.SeriesCollection(2).Values = "=Data!R2C" & k + 7 & ":R24C" & k + 7 ActiveChart.SeriesCollection(2).XValues = "=Data!R2C" & k + 2 & ":R24C" & k + 2 but this does not select the right data - it actually selects data G2:g24 and b2:b24. Could someone tell me the correct syntax please or the correct way to do it? Thanks Chris Chris |
adding data to a chart
Sounds like k = 0
HTH -- AP "inquirer" a écrit dans le message de u... I am trying to add a data series to an existing chart. I have defined k in the program and want to select cols k+7 and k+2 as the data form the sheet "Data" to add to the chart. I have: ActiveChart.SeriesCollection(2).Values = "=Data!R2C" & k + 7 & ":R24C" & k + 7 ActiveChart.SeriesCollection(2).XValues = "=Data!R2C" & k + 2 & ":R24C" & k + 2 but this does not select the right data - it actually selects data G2:g24 and b2:b24. Could someone tell me the correct syntax please or the correct way to do it? Thanks Chris Chris |
All times are GMT +1. The time now is 01:32 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com