adding a graphic using a conditional

D

drepsac

How can I add a clip art image to a specific location for a "true
result of a conditional
 
J

J.E. McGimpsey

Since worksheet functions can only return values (they can't affect
images, borders, colors, etc), you'll need to use an event macro.
One way:

Paste your image onto the sheet and position the way you want. Name
it, say, "image1".

Since you didn't specifiy a condition, assume the condition is that
J1 > 0 and that J1 has a formula in it.

Put this in your worksheet code module (right-click on the worksheet
tab, choose View code):

Private Sub Worksheet_Calculate()
Me.Shapes("image1").Visible = (Range("J1") > 0)
End Sub
 
Top