Here is the code that does the trick (I don't guarantee that it works in every cases, but it should give you the idea):
Sub ColorCharts()
For Each ch In ActiveSheet.ChartObjects
For Each ser In ch.Chart.SeriesCollection
s = Split(ser.Formula, ",")
For i = 1 To UBound(ser.Values)
ser.Points(i).Interior.Color = Range(s(2)).Cells(i).Interior.Color
Next i
Next ser
Next ch
End Sub
Following video demonstrates this:
is it possible to get charts color from source cell that has conditional formatting? i want the color formatted on the cell to be on the graph as well. thank you.
ReplyDelete