View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default autoshape color conditional formating

Sub Macro1()
ActiveSheet.Shapes("Oval 1").Select
If Range("A1").Value 0 Or Range("B1").Value 0 Then
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 17
Else
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 10
End If
End Sub
--
Gary''s Student - gsnu200786


"Dennis Collins" wrote:

I'm trying to have an autoshape turn either red or green dependent upon the
value in two other separate cells.

Example: if A1 0 or if B1 0, the make the autoshape green
otherwise, make the autoshape red.

Is there any VBA code out that that I could paste to do this?

Thanks for any help you can give.
--
Dennis