Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Conditional Colors for Charts
Hello,
I have on a sheet with several graphs and I would like to execute the procedure below automatically. In advance thank you for the assistance Yves Sub ColorColumns() Dim vntValues As Variant Dim intSeries As Integer Dim intPoint As Integer With ActiveChart For intSeries = 1 To .SeriesCollection.Count With .SeriesCollection(intSeries) vntValues = .Values For intPoint = 1 To .Points.Count If vntValues(intPoint) < 60 Then ..Points(intPoint).Interior.Color = vbRed ElseIf vntValues(intPoint) = 60 And vntValues(intPoint) < 80 Then ..Points(intPoint).Interior.Color = vbYellow Else ..Points(intPoint).Interior.Color = vbGreen End If Next End With Next End With End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Conditional Colors for Charts
What does automatically mean - when a calculation is performed, when a cell
is performed. Look at Chip Pearson's page on event http://www.cpearson.com/excel/events.htm -- Regards, Tom Ogilvy "If" wrote in message ... Hello, I have on a sheet with several graphs and I would like to execute the procedure below automatically. In advance thank you for the assistance Yves Sub ColorColumns() Dim vntValues As Variant Dim intSeries As Integer Dim intPoint As Integer With ActiveChart For intSeries = 1 To .SeriesCollection.Count With .SeriesCollection(intSeries) vntValues = .Values For intPoint = 1 To .Points.Count If vntValues(intPoint) < 60 Then .Points(intPoint).Interior.Color = vbRed ElseIf vntValues(intPoint) = 60 And vntValues(intPoint) < 80 Then .Points(intPoint).Interior.Color = vbYellow Else .Points(intPoint).Interior.Color = vbGreen End If Next End With Next End With End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Conditional Colors for Charts | Charts and Charting in Excel | |||
Conditional Colors for Charts | Charts and Charting in Excel | |||
Conditional Colors for Charts | Charts and Charting in Excel | |||
Conditional Colors for Charts | Charts and Charting in Excel | |||
Matching the colors Column Charts and Pie Charts | Charts and Charting in Excel |