How can I color code a graph in Excel using VBA, using the RGB mix? -
i use vba modify color in graph/chart in excel based on values in 3 cells (correlated rgb).
for example, cells a1 (red), a2 (green), , a3 (blue) each have value correspond color. based upon values, bar graph color change whatever rgb color indicated. 115-20-110 give me pink bar color.
i have
activechart.seriescollection.interior.color = rgb(a1, a2, a3)
but don't know vba , isn't working. appreciated, , if there less obtuse way interested of course.
thank you
try:
activechart.seriescollection(1).interior.color = rgb(range("a1").value, _ range("a2").value, _ range("a3").value)
seriescollection
represents of series on chart - need pick 1 color...
Comments
Post a Comment