J
Joe Mac
Greetings all, I'm a newb so please be gentle. After several hours o
messing around, I'm stuck and can go no further. Here is what I'
trying to do. I have a worksheet with about 20000 rows. I want t
plot every 1000 points on a seperate chart. So far, here is what
have pieced together from numerous sources. The data starts on row
and there is one space inbetween each data set, so that is why there i
the + 1001. What I get as an output are multiple of the same graph.
The way it is now, it should return the first 3 data sets, but it jus
charts the first one 3 times instead. The error its giving me is wit
the Cells().Address function where i'm defining the cells for the char
range. Whats weird is it works once. I've tried different loop type
and all do the same thing.
Dim myLastRow As Long
Dim aaaRow As Long
Dim aaaColumn As Long
Dim bbbRow As Long
aaaRow = 7
bbbRow = 0
'On Error Resume Next
aaaColumn = 5
myLastRow = Cells.Find("*", [A1], , , xlByRows, xlPrevious).Row
While aaaRow < 3000
bbbRow = aaaRow + 999
aaaCell = Cells(aaaRow, aaaColumn).Address
bbbCell = Cells(bbbRow, aaaColumn).Address
myrange = aaaCell & ":" & bbbCell
aaaRow = aaaRow + 1001
Charts.Add
ActiveChart.ChartType = xlXYScatterSmooth
ActiveChart.SetSourceDat
Source:=Sheets("0070JUL132006@0944").Range( _
myrange)
ActiveChart.Location Where:=xlLocationAsObject
Name:="0070JUL132006@0944"
Wend
Thank you
Joe McDanie
+-------------------------------------------------------------------
|Filename: Macro Help.txt
|Download: http://www.excelforum.com/attachment.php?postid=5028
+-------------------------------------------------------------------
messing around, I'm stuck and can go no further. Here is what I'
trying to do. I have a worksheet with about 20000 rows. I want t
plot every 1000 points on a seperate chart. So far, here is what
have pieced together from numerous sources. The data starts on row
and there is one space inbetween each data set, so that is why there i
the + 1001. What I get as an output are multiple of the same graph.
The way it is now, it should return the first 3 data sets, but it jus
charts the first one 3 times instead. The error its giving me is wit
the Cells().Address function where i'm defining the cells for the char
range. Whats weird is it works once. I've tried different loop type
and all do the same thing.
Dim myLastRow As Long
Dim aaaRow As Long
Dim aaaColumn As Long
Dim bbbRow As Long
aaaRow = 7
bbbRow = 0
'On Error Resume Next
aaaColumn = 5
myLastRow = Cells.Find("*", [A1], , , xlByRows, xlPrevious).Row
While aaaRow < 3000
bbbRow = aaaRow + 999
aaaCell = Cells(aaaRow, aaaColumn).Address
bbbCell = Cells(bbbRow, aaaColumn).Address
myrange = aaaCell & ":" & bbbCell
aaaRow = aaaRow + 1001
Charts.Add
ActiveChart.ChartType = xlXYScatterSmooth
ActiveChart.SetSourceDat
Source:=Sheets("0070JUL132006@0944").Range( _
myrange)
ActiveChart.Location Where:=xlLocationAsObject
Name:="0070JUL132006@0944"
Wend
Thank you
Joe McDanie
+-------------------------------------------------------------------
|Filename: Macro Help.txt
|Download: http://www.excelforum.com/attachment.php?postid=5028
+-------------------------------------------------------------------