Graphs
This is an illustration of how this could be done. It will need to be adapted
to suit your graph. In this case there is only one graph on the sheet ("Chart
1"). The macro checks the data used to create series one on the graph - this
is held in the range ("B2:F2").
Sub ChngColour()
Dim dRng As Range
Dim Cell As Range
With Sheets("Sheet1")
Set dRng = .Range("B2:F2")
For Each Cell In dRng
If Cell.Value = 50 Then
.ChartObjects("Chart 1").Activate
With ActiveChart
.SeriesCollection(1). _
Points(Cell.Column - 1). _
Interior.ColorIndex = 3
End With
End If
Next Cell
End With
Range("A1").Select
End Sub
Hope this helps
Rowan
"Douglas Voltin" wrote:
I am currently working on a bar graph and in this graph I want it to find if
a value is over 50 then show one of the bars red. Is there a macro out
there that will enable the graph to such function? If so what is it?
Thank you
Doug
|