Hello. Here's the code that I tried to incorporate to my sheet. But I just couldn't make it to suit my need.
Private Sub Test(ByVal Target As Range)
If Not Intersect(Target, Range("L3")) Is Nothing Then
If IsNumeric(Target.Value) Then
If Target.Value < 5 Then
ActiveSheet.Shapes("Oval 1").Fill.BackColor.RGB = vbRed
ElseIf Target.Value >= 5 And Target.Value < 8 Then
ActiveSheet.Shapes("Oval 1").Fill.ForeColor.RGB = vbYellow
Else
ActiveSheet.Shapes("Oval 1").Fill.ForeColor.RGB = vbGreen
End If
End If
End If
End Sub
I just started it with simple conditions instead of range, I can tweak it later once I got the colours up and working.
It worked fine if I add just one Oval but when I added the other two it's not working anymore. I simply do not know how to name or differentiate the other two Oval shapes. I tried adding Dim at the start, did not worked also. Given that it's an ActiveSheet, does it affect the balance of the code?
Bookmarks