lcfc2kotmail
02-05-2008, 10:06 AM
Hi, I have a macro which contains
ActiveSheet.Shapes.AddChart.Select
ActiveChart.ChartType = xlLine
ActiveChart.SetSourceData Source:=?????
ActiveChart.SetSourceData
Range("R16").Select
End Sub
I have added the ??? as I am unsure how do I call in that part, the name of my named ranged which I have called chartdata.
Reason I need this is the name data contains a formula to make my range dynamic for a chart range...
=OFFSET('Sheets3'!$A$1,0,0,COUNTA('Sheet3'!$A:$A),COUNTA('Sheet3'!$1:$1)).
Or does anybody no how I can incorporate that into creating my chart as it will be dynamic based on the data on that sheet.
Many Thanks!!
ActiveSheet.Shapes.AddChart.Select
ActiveChart.ChartType = xlLine
ActiveChart.SetSourceData Source:=?????
ActiveChart.SetSourceData
Range("R16").Select
End Sub
I have added the ??? as I am unsure how do I call in that part, the name of my named ranged which I have called chartdata.
Reason I need this is the name data contains a formula to make my range dynamic for a chart range...
=OFFSET('Sheets3'!$A$1,0,0,COUNTA('Sheet3'!$A:$A),COUNTA('Sheet3'!$1:$1)).
Or does anybody no how I can incorporate that into creating my chart as it will be dynamic based on the data on that sheet.
Many Thanks!!