Forum Discussion

WesJD's avatar
WesJD
Copper Contributor
May 12, 2020

Excel changes multiple series colors at once

I have a simple X-Y chart with five series of markers, no lines. When I change the color of the markers on Series 5, Series 1 also changes to the same color, and when I change Series 1 back to the color it was, Series 5 also changes. It's like they've been linked somehow. Has anyone else seen this issue?

10 Replies

  • AhmedMahmoud23's avatar
    AhmedMahmoud23
    Copper Contributor

    WesJD This is funny. I'm trying to achieve the exact opposite of what you're describing here. I have a dataset of 100 iterations and I wish to have them all in one color. Why? Because these are all generated simulations that are based on a single original dataset. I want to make a chart where only the original dataset has a unique color from the other 100 iterations and I don't feel like going through the color of every single one of those 100 series just to change it, then find out that the color is wrong, so I end up changing it again.

     

    TL;DR I'm trying to create your bug on purpose

    • JonPeltier's avatar
      JonPeltier
      MVP

      AhmedMahmoud23 This could be done with VBA. I have some dummy data, an original series plus four iterations (but it can be as many as you want, up to Excel's limit). The original chart is at top right. In "Chart Before" I have formatted the original series with a black line and the first iteration with a gray line. "Chart After" is the result of a simple VBA procedure, below the screenshot.

       

       

      Sub FormatSeriesTheSame()
        If ActiveChart Is Nothing Then
          MsgBox "Select a chart and try again!", vbExclamation
          GoTo ExitSub
        End If
        
        With ActiveChart
          Dim iColor As Long
          iColor = .SeriesCollection(2).Format.Line.ForeColor.RGB
          Dim iSeries As Long
          For iSeries = 3 To .SeriesCollection.Count
            .SeriesCollection(iSeries).Format.Line.ForeColor.RGB = iColor
          Next
        End With
        
      ExitSub:
      End Sub

       

    • WesJD's avatar
      WesJD
      Copper Contributor

      AshaKantaSharma, thank you for responding but that link does not address my problem. I'm not trying to change only one or two points, I'm changing the color of the full series, and a different series is changing at the same time. I believe it's a bug in Excel. 

Resources