Computing.Net > Forums > Programming > excel macro do-loop

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

excel macro do-loop

Reply to Message Icon

Name: marek
Date: September 30, 2003 at 06:46:48 Pacific
OS: 2000
CPU/Ram: 1000/256
Comment:

My problem is that I would like to make charts in 'do loop' command but I don't know how to insert do-parameter in sheet series. Exactly how to insert in lines "=Sheet1!R3C2:R10C2" and "=Sheet1!R3C3:R10C3" changeable parameters (e.g. I and J) instead of numbers 2 and 3?
the macro is below
thanks for your help!

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 9/30/2003 by nhw2zot
'

'
Charts.Add
ActiveChart.ChartType = xlXYScatterSmooth
ActiveChart.SetSourceData Source:=Sheets("Sheet1").Range("N33")
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(1).XValues = "=Sheet1!R3C2:R10C2"
ActiveChart.SeriesCollection(1).Values = "=Sheet1!R3C3:R10C3"
ActiveChart.Location Where:=xlLocationAsObject, Name:="Sheet1"
With ActiveChart
.HasTitle = True
.ChartTitle.Characters.Text = "ADF"
.Axes(xlCategory, xlPrimary).HasTitle = True
.Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "ADFFFF"
.Axes(xlValue, xlPrimary).HasTitle = True
.Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "ADFAE"
End With
End Sub



Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: excel macro do-loop

Excel macro www.computing.net/answers/programming/excel-macro/11810.html

Excel Macro protect www.computing.net/answers/programming/excel-macro-protect/14778.html

Can I call an Excel macro from cell www.computing.net/answers/programming/can-i-call-an-excel-macro-from-cell/4812.html