Iarampatta
New Member
- Joined
- Oct 20, 2015
- Messages
- 3
Hi everyone,
I'm currently doing a project which requires me to map out a certain range of companies and two financial characteristics which are plotted on the X and Y axes. I've managed to do this and am presented with a chart that shows what I want it to.
Problem is, it's got about 60 series (Since each company [data point] is a single series), and thanks to Excel being Excel, you can't format multiple series at the same time. Each data point has to be a size 7 diamond that has the RGB code (70,85,95). I've managed to achieve this with this code:
Sub Change_Marker()
Dim ser As Series
With ActiveSheet.ChartObjects("Chart 1").Chart
For Each ser In .SeriesCollection
With ser
.MarkerStyle = 2
.MarkerSize = 7
.Format.Fill.ForeColor.RGB = RGB(70, 85, 95)
.Format.Line.Visible = msoFalse
End With
Next ser
End With
End Sub
However, there is formatting restrictions on the Data Label as well. The text has to be Arial, Size 8 and I was wondering what code I should be using to achieve this. I tried using the "For Each" method, but had no luck.
Any chance anyone would be able to help?
I'm currently doing a project which requires me to map out a certain range of companies and two financial characteristics which are plotted on the X and Y axes. I've managed to do this and am presented with a chart that shows what I want it to.
Problem is, it's got about 60 series (Since each company [data point] is a single series), and thanks to Excel being Excel, you can't format multiple series at the same time. Each data point has to be a size 7 diamond that has the RGB code (70,85,95). I've managed to achieve this with this code:
Sub Change_Marker()
Dim ser As Series
With ActiveSheet.ChartObjects("Chart 1").Chart
For Each ser In .SeriesCollection
With ser
.MarkerStyle = 2
.MarkerSize = 7
.Format.Fill.ForeColor.RGB = RGB(70, 85, 95)
.Format.Line.Visible = msoFalse
End With
Next ser
End With
End Sub
However, there is formatting restrictions on the Data Label as well. The text has to be Arial, Size 8 and I was wondering what code I should be using to achieve this. I tried using the "For Each" method, but had no luck.
Any chance anyone would be able to help?