http://peltiertech.com/Excel/Charts/ConditionalChart1.html
- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______
"jonny" <jo...@discussions.microsoft.com> wrote in message
news:3CAD2A75-F7E9-4315...@microsoft.com...
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Not Intersect(Target, Range("A1")) Is Nothing Then
Dim Cht As ChartObject
Dim Srs As Series
'The name of the chart (i.e. Cht1)
Set Cht = ActiveSheet.ChartObjects("Cht1")
'The number of the series that you want to change i.e. 1
Set Srs = Cht.Chart.SeriesCollection(1)
If IsEmpty("A1") = True Then
Exit Sub
ElseIf Range("A1").Value = True Then
Cht.Activate
'The color number of the series if value = TRUE
Srs.Border.ColorIndex = 5
Srs.MarkerBackgroundColorIndex = 5
Srs.MarkerForegroundColorIndex = 5
ElseIf Range("A1").Value = False Then
Cht.Activate
'The color number of the series if value = FALSE
Srs.Border.ColorIndex = 7
Srs.MarkerBackgroundColorIndex = 7
Srs.MarkerForegroundColorIndex = 7
End If
Range("A2").Select
End If
End Sub
--
John Mansfield
http://cellmatrix.net