I've been trying for some time to write some code to conditionally format data points in a scatter plot.
following is an extract which formats the data point style for a range of data series, not very tidy I know, but it works. I
wanted to control the data point style and size of series 1-29, 29-58 etc. I know hard coding is never a good idea, but it
was the best I could do.
Data labels are switched off because there are too many and the chart was crowded,
however I do want the data labels to show if the sum of x-co-ord muliplied by y co-ord is greater than a stated figure
x vals are decimals between 1 and 5
y vals are decimals between 1 and 5
I want all data points where x times y >20 to have the data labels switched
Any suggestions would be great
Extract of existing code as follows, remainder just repeats for the
for the next x series and applies a different data point style
Private Sub Chart_Activate()
Application.ScreenUpdating = False
Dim Answer As String
Dim MyNote As String
'Place your text here
MyNote = "Do you want to update the chart?"
Answer = MsgBox(MyNote, vbQuestion + vbYesNo, "Chart Update")
If Answer = vbNo Then
'Code for No button Press
'MsgBox "You pressed NO!"
'Code for Yes button Press
Dim i As Integer
total = 0
For i = 1 To 29
Selection.MarkerStyle = 3
Selection.MarkerSize = 6
MarkerBackgroundColorIndex = 3
Selection.ShowSeriesName = False
Selection.ShowValue = False