Hello all! I am stuck trying to find the best way to loop the code to change each of 36 shapes based on the values in corresponding 36 cells. The only code I have been able to find is
If IsNumeric(Target.Value) Then
If Target.Value < 0.15 Then
ActiveSheet.Shapes("Freeform 45").Fill.ForeColor.RGB = RGB(235, 241, 222)
ElseIf Target.Value >= 0.15 And Target.Value <= 0.199 Then
ActiveSheet.Shapes("Freeform 45").Fill.ForeColor.RGB = RGB(216, 228, 188)
ElseIf Target.Value >= 0.2 And Target.Value < 0.249 Then
ActiveSheet.Shapes("Freeform 45").Fill.ForeColor.RGB = RGB(196, 215, 155)
Else
ActiveSheet.Shapes("Freeform 45").Fill.ForeColor.RGB = RGB(118, 147, 60)
End If
This works but requires me to somehow nest these IFs and I would have to manually change the shape names in the code. Is there way to have the code to change the color run for each cell in a range and change the color of its corresponding shape based on the value? Conditional formatting won't work I think because I have a non-standard shape.
Thanks so much in advance for any and all help!
Bookmarks