Displaying Images as a result of an if statement

TommyRevs

New Member
Joined
Sep 2, 2004
Messages
4
Is it possible to write an if statement to display a picture if a cell contains a certain value? Ive got if statements nailed, its not a problem with that i have, just the returning of an image, rather than text ar a hyperlink.

Eg, "if cell A1="stadium", to show a picture of a stadium in cell C1"

Thanks in advance for any help
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
The only thing I can thing of is to use VBA on the change event to make the object visible = true or false.
 
Upvote 0
Do you want the actual picture in the cell, or just a hyperlink to it?

if you're ok with just a hyperlink, try the following code in cell C1:

Code:
=IF(A1="stadium",HYPERLINK("C:\stadium.jpg"),)

Where "C:\stadium.jpg is the file location that you are pointing to.
 
Upvote 0
Sorry, if i didn't make myself clear, i'm fine at getting a hyperlink, but i would like the picture just to appear in its designated place.

Thanks for your help anyway.
 
Upvote 0
PaddyD. I tried the link you suggested and the download and was unable to get the files. Message reads after download "no files to extract". Is anyone else having this problem? Thank you for the link though, has lots of neat information on the page. J.Dee
 
Upvote 0
PaddyD:
Thank you for the email you sent with the file. Tried it this a.m. and now works fine. I appreciate the fact you took your time to send it to me. J.Dee
 
Upvote 0
The example is not helping. The statement is
If A1=desk then display pic of desk

Can anyone help with this?

Thank you
Gregg
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,695
Members
448,979
Latest member
DET4492

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top