Can an IF statement insert an picture?

G

Guest

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")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top