Log in

View Full Version : Dynamic Excel Chart VBA



lcfc2kotmail
03-03-2008, 08:53 PM
Hi

I have a column of data say in cell A1 - contains the name
and A2 - Axx contains values.

I would like to know how I could create a chart form this, having the name cell in A1 as the series name and from A2 - Axx (being dynamic) as the values.

Most likely output as a Line chart...

Many Thanks

Bob Phillips
03-04-2008, 02:15 AM
Create a dynamic range name, say data, with a RefersTo of

=OFFSET($A$1,1,,COUNTA($A:$A)-1,1)

For the seris, set the Name to cell A1, and set the Values range to Sheet1!data. You cannot set the whole data source to the name, you have to set each individaul series values.