Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Creating charts from a .dat file with vba.
Hi there,
I'm trying using excel vba to create multiple charts from data in a dat file. The data comes in as a long list. I've created a loop to get the data and plot it to different charts but my lack of experience with vba is preventing me from getting it to work. This is my code Sub DataChart() Dim Irow As Long Dim i As Integer Dim srsNew As Series Irow = 5 i = 5 Do Until i 5565 For j = 1 To 3 '' Create the chart Charts.Add ActiveChart.ChartType = xlXYScatter ActiveChart.Location Whe=xlLocationAsNewSheet '' Add the series Set srsNew = ActiveChart.SeriesCollection.NewSeries With srsNew .Name = "Cells(Irow, 2)" .Values = ActiveSheet.Range(Cells(i, j), Cells(i + 82, j)) .XValues = ActiveSheet.Range(Cells(Irow, 1), Cells(Irow + 82, 1)) End With Next j i = i + 83 Irow = Irow + 83 Loop End Sub I would appreciate any help or advice. Thanks, Simon. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Creating multiple charts from large data file | Charts and Charting in Excel | |||
Creating charts | Excel Discussion (Misc queries) | |||
Creating Charts | Charts and Charting in Excel | |||
creating charts with XY | Charts and Charting in Excel | |||
Creating Charts using COM | Charts and Charting in Excel |