I created thermometer charts that are colored based on the range (red - bad, yellow - medium, green - good) from the cells in my sheet. That is, the chart indicates the color of the cell to determine the fill color. However, when printing in black and white, red and green are difficult to distinguish. I do not want to give up the color of the brake lights, because it is intuitive for my audience.
I am trying to figure out how to get a chart fill to reflect a pattern in cells in addition to color. My current syntax (for fill color) is given below.
Sub ColorByValueSMICAUpdate()
Dim rPatterns As Range
Dim iPattern As Long
Dim vPatterns As Variant
Dim iPoint As Long
Dim vValues As Variant
Dim rValue As Range
Set rPatterns = ActiveSheet.Range("P5:P11")
vPatterns = rPatterns.Value
With ActiveChart.SeriesCollection(1)
vValues = .Values
For iPoint = 1 To UBound(vValues)
For iPattern = 1 To UBound(vPatterns)
If vValues(iPoint) <= vPatterns(iPattern, 1) Then
.Points(iPoint).Format.Fill.ForeColor.RGB = _
rPatterns.Cells(iPattern, 1).Interior.Color
Exit For
End If
Next
Next
End With
End Sub
Thank!
source
share