Sorry, I have to come back to this one more time.
Starting from NickyC's advice I have arrived at the following code to color a chart's bars by series:
Sub colors()
Dim sS As Series
For Each sS In ActiveChart.SeriesCollection
If sS.Name = "1" Then sS.Interior.Color = RGB(83, 142, 213)
If sS.Name = "2" Then sS.Interior.Color = RGB(141, 180, 227)
If sS.Name = "3" Then sS.Interior.Color = RGB(197, 217, 241)
If sS.Name = "4" Then sS.Interior.Color = RGB(230, 185, 184)
If sS.Name = "5" Then sS.Interior.Color = RGB(217, 151, 149)
If sS.Name = "6" Then sS.Interior.Color = RGB(149, 55, 53)
If sS.Name = "7" Then sS.Interior.Color = RGB(49, 132, 155)
If sS.Name = "8" Then sS.Interior.Color = RGB(147, 205, 221)
If sS.Name = "9" Then sS.Interior.Color = RGB(182, 221, 232)
If sS.Name = "10" Then sS.Interior.Color = RGB(197, 190, 151)
If sS.Name = "11" Then sS.Interior.Color = RGB(148, 139, 84)
If sS.Name = "12" Then sS.Interior.Color = RGB(178, 161, 199)
If sS.Name = "13" Then sS.Interior.Color = RGB(253, 233, 217)
If sS.Name = "14" Then sS.Interior.Color = RGB(216, 216, 216)
If sS.Name = "15" Then sS.Interior.Color = RGB(151, 72, 7)
Next sS
End Sub
Now I have another chart (pie) where the same names apply, but they are the points of one single series. So how would I change the code to make it work with data points instead of series'? I tried'n'erred a while, but my knowledge about the syntax is just to limited right now.
Thanks,
Alex
Bookmarks