I've read the threads about resetting pivot chart formats using a macro, but I cannot get consistent results with the macro due to changing number of series. My data has up to 16 series and I am using multiple filters including project name, category, channel and SKU number. Not every SKU has all the series. In order to make graph easily understood, I am trying to format each series with specific colors, line and marker styles, etc. I’d also like to mix in a couple of the series as area graphs.
When I record the macro and then run it with a different selection, it does not apply the formatting to the same series as I did when recording the macro. I believe that is because the macro records the series selection line this:
ActiveChart.SeriesCollection(12).Select
However, depending on how many series are in the filtered data, SeriesCollection(12) migh be prior year history, or Marketing projection, or some other data, or there might not even be 12 series.
Is there another way to write the macro so it selects the series by name?
Bookmarks