Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("E9")) Is Nothing Then Exit Sub
If IsNumeric(Target.Value) Then
If Target.Value < 0 Then
ActiveSheet.Shapes("Rectangle 2").Fill.ForeColor.RGB = vbRed
Else
ActiveSheet.Shapes("Rectangle 2").Fill.ForeColor.RGB = vbGreen
End If
End If
End Sub
In cell E9 I have the formula:
=IF(H9="";"";INDEX(Sales!E39:P39;MATCH(Main!AE3;Sales!E34:P34;0)))
This doesn't seem to work, only if I write manually for example 500 in E9. Any solutions?