S
steveski
I have a PivotChart (bar chart). When I format a data series and chang
the color of the bar, it changes color OK. However, when I refresh th
PivotChart, the color reverts to the default. I understand this is
known problem.
I tried recording a macro to capture the code for changing the ba
colors. Then I put the macro code in the Chart’s VBA code to run whe
the chart automatically refreshes. This works fine, as long as all th
series are present. However, it is possible sometimes for one or mor
series to be absent from the list. When this happens, and I run th
code, I get an error because VBA is trying to change the color of
series collection that is absent. The other problem with this method i
that it cannot differentiate between the series, each of which shoul
have its own color. If the ‘first’ series is missing, then the ‘second
series gets the ‘first’ series’ color.
My data series are designated ‘E’, ‘R1’, ‘R2’, ‘R3’, ‘PM’, and ‘O’. I’
thinking I could assign a color index to each series in my data entr
sheet. Then the PivotTable could get the color indices. The
(hopefully), the PivotChart could get and use the respective colo
indices, regardless of which series are present or absent.
Does this sound feasible? If yes, can you help me figure out how to ge
the PivotChart to get and use the color indices?
Thank you
the color of the bar, it changes color OK. However, when I refresh th
PivotChart, the color reverts to the default. I understand this is
known problem.
I tried recording a macro to capture the code for changing the ba
colors. Then I put the macro code in the Chart’s VBA code to run whe
the chart automatically refreshes. This works fine, as long as all th
series are present. However, it is possible sometimes for one or mor
series to be absent from the list. When this happens, and I run th
code, I get an error because VBA is trying to change the color of
series collection that is absent. The other problem with this method i
that it cannot differentiate between the series, each of which shoul
have its own color. If the ‘first’ series is missing, then the ‘second
series gets the ‘first’ series’ color.
My data series are designated ‘E’, ‘R1’, ‘R2’, ‘R3’, ‘PM’, and ‘O’. I’
thinking I could assign a color index to each series in my data entr
sheet. Then the PivotTable could get the color indices. The
(hopefully), the PivotChart could get and use the respective colo
indices, regardless of which series are present or absent.
Does this sound feasible? If yes, can you help me figure out how to ge
the PivotChart to get and use the color indices?
Thank you