Can an IF statement insert an picture?

I

Iriemon

Is there any way to use an IF statement to have it return an picture? Example:

= IF(a1=1,xxxxxx.jpg,"")

If cell a1 =1, insert a picture, otherwise leave cell blanK.

Thanks!
 
D

Don Guillett

A formula may only return a value. You need a macro, Try

if range("a1")=1 then
ActiveSheet.Pictures.Insert("C:\yourfolder\yourpicture.jpg")
 
Top