R
rajltd
Hi,
Can I be able to select a larger graph range instead of B2:F4. The
thing is, this graph can vary in columns and rows. Moreover i have to
ignore c-column, thats why I have taken as
activesheet.seriescollection(1).delete. One more thing - "ABC" is in
the first column - not R1C1. Can i select it in any way instead of
hard-coding it (i mean selecting a cell). And same with "Date" and
"Position".
Charts.Add
ActiveChart.ApplyCustomType ChartType:=xlBuiltIn,
TypeName:="Logarithmic"
ActiveChart.SetSourceData
Source:=Sheets("Keyword_Analysis").Range("B2:F4"), _
PlotBy:=xlColumns
ActiveChart.SeriesCollection(1).Delete
ActiveChart.SeriesCollection(1).Name = "=Keyword_Analysis!R1C4"
ActiveChart.SeriesCollection(2).Name = "=Keyword_Analysis!R1C5"
ActiveChart.SeriesCollection(3).Name = "=Keyword_Analysis!R1C6"
ActiveChart.Location Where:=xlLocationAsNewSheet, Name:="Chart1"
With ActiveChart
..HasTitle = True
..ChartTitle.Characters.Text = "ABC"
..Axes(xlCategory, xlPrimary).HasTitle = True
..Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text =
"Date"
..Axes(xlValue, xlPrimary).HasTitle = True
..Axes(xlValue, xlPrimary).AxisTitle.Characters.Text =
"Position"
Any help will be appreciated. Thanks in advance.
Raj
+----------------------------------------------------------------+
| Attachment filename: keyword.xls |
|Download attachment: http://www.excelforum.com/attachment.php?postid=377504|
+----------------------------------------------------------------+
Can I be able to select a larger graph range instead of B2:F4. The
thing is, this graph can vary in columns and rows. Moreover i have to
ignore c-column, thats why I have taken as
activesheet.seriescollection(1).delete. One more thing - "ABC" is in
the first column - not R1C1. Can i select it in any way instead of
hard-coding it (i mean selecting a cell). And same with "Date" and
"Position".
Charts.Add
ActiveChart.ApplyCustomType ChartType:=xlBuiltIn,
TypeName:="Logarithmic"
ActiveChart.SetSourceData
Source:=Sheets("Keyword_Analysis").Range("B2:F4"), _
PlotBy:=xlColumns
ActiveChart.SeriesCollection(1).Delete
ActiveChart.SeriesCollection(1).Name = "=Keyword_Analysis!R1C4"
ActiveChart.SeriesCollection(2).Name = "=Keyword_Analysis!R1C5"
ActiveChart.SeriesCollection(3).Name = "=Keyword_Analysis!R1C6"
ActiveChart.Location Where:=xlLocationAsNewSheet, Name:="Chart1"
With ActiveChart
..HasTitle = True
..ChartTitle.Characters.Text = "ABC"
..Axes(xlCategory, xlPrimary).HasTitle = True
..Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text =
"Date"
..Axes(xlValue, xlPrimary).HasTitle = True
..Axes(xlValue, xlPrimary).AxisTitle.Characters.Text =
"Position"
Any help will be appreciated. Thanks in advance.
Raj
+----------------------------------------------------------------+
| Attachment filename: keyword.xls |
|Download attachment: http://www.excelforum.com/attachment.php?postid=377504|
+----------------------------------------------------------------+