EXCEL spreadsheets... Graphs and Automating! VB?

I have over three hundred graphs that I need to create from an EXCEL spreadsheet.
They're pretty complex with four series in each graph.
How can I automate this task?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I'm not familiar with any of the methods, but i know its possible to do this with EXCEL 2003 and COM.  I know this won't win me any points, but I hope it gets you in the right direction.
First step is to enable VBA and then do one time.

It means when you do it, automatically VBA code will be generated.

So just that VBA code.
Modifiy it accordingly that it becomes generic.

Then you can just put a loop where you pull the data from one point, insert into those automation code, then save those excel sheets.

Funda stuff.

Are you listen...? Reply me. So then we can discuss further

Hi SuperCableMan,
creating the chart shouldn't be a problem. setting the sourcedata range of each chart will be the tricky part. How is the data organised in your sheet? are they is some kind of order?
The following code assumes that your sheet1 has data in A1:D50. first chart's source will be A1:D5 the next chart A6:D10 and so on...

Sub AddChart()
Dim chtChart As Chart
For i = 1 To 50 Step 5
Set chtChart = Charts.Add
With chtChart
.Name = "chart" & i
.ChartType = xlColumnClustered
.SetSourceData Source:=Sheets("Sheet1").Range("A" & i & ":D" & i + 4), PlotBy:=xlRows
.HasTitle = True
.ChartTitle.Text = "chart" & 1
.Axes(xlCategory, xlPrimary).HasTitle = True
.Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "Month"
.Axes(xlValue, xlPrimary).HasTitle = True
.Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "Sales"
End With
Next i
End Sub

btw to use the code open your workbook hit alt+f11, this opens the vbe window. here select module form the insert menu and paste the code below. close the vbe window, back in xl, hit alt+f8 select AddChart and click on run. 50 charts will be created using the data A1:D50


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
>>50 charts will be created using the data A1:D50
that should have been
10 charts will be created using the data A1:D50
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.