Sub test()
Dim shp As Shape
Dim rng As Range
'run multiple times to test toggled value
' say the condition cell is right of the Y cell
' and the condition =1
Set rng = Range("B3") '>> Change
With rng.Offset(0, 1)
.Value = IIf(.Value = 1, 0, 1) ' toggle value
End With
On Error Resume Next
Set shp = ActiveSheet.Shapes("Yes" & rng.Address(0, 0))
If shp Is Nothing Then
Set shp = ActiveSheet.Shapes.AddShape(msoShapeOval, 1, 1, 1, 1)
With shp
.Name = "Yes" & rng.Address(0, 0)
.Line.Weight = 0.75
.Line.DashStyle = msoLineSolid
.Line.Style = msoLineSingle
End With
End If
On Error GoTo 0
With rng
shp.Left = .Left + .Width / 2 - .Height / 2
shp.Top = .Top
shp.Width = .Height
shp.Height = .Height
shp.Fill.Visible = msoFalse
shp.Line.Visible = .Offset(0, 1) = 1
.Value = "Y"
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
End With
End Sub
Regards,
Peter T
"Steve R." <(E-Mail Removed)> wrote in message
news

2CC1218-0B65-4486-810A-(E-Mail Removed)...
> Hello,
> I need to draw a circle around a Y in a cell. If a differenct cell has
been
> populated. I actually need to do this on several lines within the
worksheet.
> Am using Excel 2002. If the test cell is empty I just need the Y with no
> circle.
>
> Thanks