Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
quickcreator
 
Posts: n/a
Default Create Multiple Charts w/ VB


I'd like to create a chart, many times over.
My data is in XY format.

Upon using the recording feature, it locks in a specific chart name,
"Chart1"; and also, locks in a specific data range, "A1:F5".

I was wanting to create this XY chart with A1:F5 for Chart1, then have
it move down and grab A7:F11 for Chart2, and so on. I have about 100
or so data ranges to create that many charts.

How can I make these references relative or unlock the specific cell
address?

Any help would be greatly appreciated.

Thanks!,
Kevin


--
quickcreator
  #2   Report Post  
Jon Peltier
 
Posts: n/a
Default

Kevin -

You'll need something like this:

Sub MakeCharts()
Dim iChart as Long
Dim wsData as Worksheet

Set wsData = ActiveSheet
For iChart = 1 to 100
With Charts.Add
.SetSourceData _
Source:=wsData.Range("A1:F5").Offset((iChart - 1) * 6)
.Name = "Chart" & Format(iChart, "000")
End With
Next
End Sub

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______

quickcreator wrote:

I'd like to create a chart, many times over.
My data is in XY format.

Upon using the recording feature, it locks in a specific chart name,
"Chart1"; and also, locks in a specific data range, "A1:F5".

I was wanting to create this XY chart with A1:F5 for Chart1, then have
it move down and grab A7:F11 for Chart2, and so on. I have about 100
or so data ranges to create that many charts.

How can I make these references relative or unlock the specific cell
address?

Any help would be greatly appreciated.

Thanks!,
Kevin



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How To Change Fonts In Multiple Charts in a Workbook? Cweed Charts and Charting in Excel 1 August 30th 05 12:07 AM
Format multiple Charts adodson Charts and Charting in Excel 1 August 26th 05 07:58 PM
multiple pie of pie charts Nerissa Charts and Charting in Excel 1 June 11th 05 06:02 AM
Macro for multiple charts JS Excel Worksheet Functions 1 November 19th 04 03:44 AM
HOW DO I CREATE MULTIPLE CURRENCY ERIC BROWN Excel Worksheet Functions 3 November 2nd 04 08:55 PM


All times are GMT +1. The time now is 07:23 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"