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
 
"The only thing I can thing of is to use VBA on the change event to make the object visible = true or false." I don't think it is possible to get it to show whwerever you want. I belive you can use code to make a picture visible and move it to where you want once, but unless you keep an information sheet (to keep records of where each picture was moved to, so you can move it back before moving it to a new location), I don't think you can move it somewhere else. I think you can't tell a picture to be at x, y, just move x and move y, where the starting point will always be where it last was.

If this is right, you would have to insert each picture you want once and setup a table (or just modify the name of each object) to associate your terms with the object names. Then set each picture to be invisible. Your code would have to find the object name, check to be sure it is not used some where else and if it is, copy and paste it and then keep track of the new one as well. You code would also have to go through all the pictures to be sure that none are supposed to be hidden.

Sorry for the rambling, but it seems like it is doable, just not that easy to use.
 
Upvote 0

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
My main problem is I do not know where to put the pictures.
Do I hide in the main worksheet? or do I put them next to the pic table?
When I move the marco to my live worksheet, I do not have any picutres and there is an error in the marco.

Please help

Gregg
 
Upvote 0

Forum statistics

Threads
1,215,360
Messages
6,124,493
Members
449,166
Latest member
hokjock

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