I would like to control shape colors to display a dashboard based on cell value resulting from AVERAGE(,,,) formula
My sub works fine with numeric values.
Any suggestions are very much appreciated.
=================================
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("B5")) Is Nothing Then Exit Sub
If IsNumeric(Target.Value) Then
If Target.Value > 0.75 Then
ActiveSheet.Shapes("Shape1").Fill.ForeColor.RGB = vbGreen
ElseIf Target.Value < 0.75 And Target.Value >= 0.5 Then
ActiveSheet.Shapes("Shape1").Fill.ForeColor.RGB = vbYellow
Else
ActiveSheet.Shapes("Shape1").Fill.ForeColor.RGB = vbRed
End If
End If
End Sub
Bookmarks