Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How To Change Fonts In Multiple Charts in a Workbook? | Charts and Charting in Excel | |||
Format multiple Charts | Charts and Charting in Excel | |||
multiple pie of pie charts | Charts and Charting in Excel | |||
Macro for multiple charts | Excel Worksheet Functions | |||
HOW DO I CREATE MULTIPLE CURRENCY | Excel Worksheet Functions |