Morning, I have a list of 35 shops and their sales, the chart updates weekly and the list of shops re-orders according to their sales position
The ordering of the shops is based on a formula, using the LARGE function
Some of the shops need to have their data point in a different colour.
Up to now I have used a rather unwieldy way of coding this but believe there may well be a better way....part of the code I am using....to give you an example is
This works but rather then having 2 colour options I want 3 and this as you can see will mean a huge amount more code.
Does anyone have any ideas of a better way please ?
Thanks
The ordering of the shops is based on a formula, using the LARGE function
Some of the shops need to have their data point in a different colour.
Up to now I have used a rather unwieldy way of coding this but believe there may well be a better way....part of the code I am using....to give you an example is
Code:
If Range("AI3") = 1 Then
Sheets("AWPI").ChartObjects("Chart 1").Chart.SeriesCollection(1).Points(1).Interior.Color = RGB(204, 155, 255)
Else
Sheets("AWPI").ChartObjects("Chart 1").Chart.SeriesCollection(1).Points(1).Interior.Color = RGB(202, 255, 151)
End If
If Range("AI4") = 1 Then
Sheets("AWPI").ChartObjects("Chart 1").Chart.SeriesCollection(1).Points(2).Interior.Color = RGB(204, 155, 255)
Else
Sheets("AWPI").ChartObjects("Chart 1").Chart.SeriesCollection(1).Points(2).Interior.Color = RGB(202, 255, 151)
End If
If Range("AI5") = 1 Then
Sheets("AWPI").ChartObjects("Chart 1").Chart.SeriesCollection(1).Points(3).Interior.Color = RGB(204, 155, 255)
Else
Sheets("AWPI").ChartObjects("Chart 1").Chart.SeriesCollection(1).Points(3).Interior.Color = RGB(202, 255, 151)
End If
If Range("AI6") = 1 Then
This works but rather then having 2 colour options I want 3 and this as you can see will mean a huge amount more code.
Does anyone have any ideas of a better way please ?
Thanks