Hi Everybody
I hope you can help me - I have been searching for the answer and got so far but cant seem to get over the final hurdle
I have worked out how to create a bubble chart and pieced together a macro from others work, with the aim of making the bubbles coloured based on a column of values (Green, Amber/Green,Amber,Amber/Red,Red). My code is below but it doesn't address;
1) two colours required on one bubble (Amber /red and amber/green) - comes up grey at present
2) although the bubbles data has been sorted descending to avoid hidden bubbles, I really need to have only the edge of the bubble coloured and the interior transparent
3) I cant seem to add the labels of the entry's correctly (in this case, project names), and when you hover over the bubble, it just states the series name
Any help would be greatly appreciated
I am leaving work now but will pick and reply to any replies tomorrow morning
Thanks
Andy
I hope you can help me - I have been searching for the answer and got so far but cant seem to get over the final hurdle
I have worked out how to create a bubble chart and pieced together a macro from others work, with the aim of making the bubbles coloured based on a column of values (Green, Amber/Green,Amber,Amber/Red,Red). My code is below but it doesn't address;
1) two colours required on one bubble (Amber /red and amber/green) - comes up grey at present
2) although the bubbles data has been sorted descending to avoid hidden bubbles, I really need to have only the edge of the bubble coloured and the interior transparent
3) I cant seem to add the labels of the entry's correctly (in this case, project names), and when you hover over the bubble, it just states the series name
Any help would be greatly appreciated
I am leaving work now but will pick and reply to any replies tomorrow morning
Thanks
Andy
Code:
Sub ColorPoints()
Dim i As Integer
Dim myRange As Range
Dim iColor As Integer
Set myRange = ActiveSheet.Range("M2:M52")
For i = 1 To myRange.Rows.Count
Select Case WorksheetFunction.Index(myRange, i).Value
Case "Green"
iColor = 10 ' green
Case "Amber/Green"
iColor = 10 / 44
Case "Amber"
iColor = 44 ' orange
Case "Amber/Red"
iColor = 44 / 3
Case "Red"
iColor = 3
End Select
ActiveSheet.ChartObjects(1).Chart.SeriesCollection(1). _
Points(i).Interior.ColorIndex = iColor
Next
End Sub