Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Is this "If Statement" Possible?
I want an if statement like "=if(a1=1,"A","B")" instead of
inserting the A or B I want it to insert a picture file in the cell. "=if(a1=1,Picture A,Picture B)" Is this possible? Thanks Pete |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Is this "If Statement" Possible?
Unfortunately, that is not possible. A formula can only change the
value in the cell. Also, images in XL are never *in* a cell. They reside in a layer that 'floats' above the cells. -- Regards, Tushar Mehta, MS MVP -- Excel www.tushar-mehta.com Excel, PowerPoint, and VBA add-ins, tutorials Custom MS Office productivity solutions In article , says... I want an if statement like "=if(a1=1,"A","B")" instead of inserting the A or B I want it to insert a picture file in the cell. "=if(a1=1,Picture A,Picture B)" Is this possible? Thanks Pete |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Is this "If Statement" Possible?
What about with VBA? This is something that's intrigued me for a while,
and I've been waiting for a project where I might get to test it out. Specifically, I was thinking in terms of a card game. Have an array of 52 cards, and 52 card pictures stored on the hard drive. Based upon what random value was called, load a picture. So, for example, if the array randomly selects DI,4 (4 of Diamonds) then make the first picture DI4.jpg Any way to have VBA code change / modify OLE objects? I know in access I had a way to do it, where I stored 52 pictures as an OLE table. But Excel doesnt work that way. So, any light that can be shed on that, thanks. :) -Bob --- Message posted from http://www.ExcelForum.com/ |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Is this "If Statement" Possible?
Turn on the macro recorder (Tools | Macro Record new macro...),
insert an image from a file, delete the inserted image, and turn off the recorder. XL will give you the necessary starter code that you can then modify and generalize. -- Regards, Tushar Mehta, MS MVP -- Excel www.tushar-mehta.com Excel, PowerPoint, and VBA add-ins, tutorials Custom MS Office productivity solutions In article , beeawwb says... What about with VBA? This is something that's intrigued me for a while, and I've been waiting for a project where I might get to test it out. Specifically, I was thinking in terms of a card game. Have an array of 52 cards, and 52 card pictures stored on the hard drive. Based upon what random value was called, load a picture. So, for example, if the array randomly selects DI,4 (4 of Diamonds) then make the first picture DI4.jpg Any way to have VBA code change / modify OLE objects? I know in access I had a way to do it, where I stored 52 pictures as an OLE table. But Excel doesnt work that way. So, any light that can be shed on that, thanks. :) -Bob --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Combining "IF"statement with "Vlookup" | Excel Discussion (Misc queries) | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
change "true" and "false" to "availble" and "out of stock" | Excel Worksheet Functions | |||
embedding "ISERROR" function into an "IF" statement | Excel Worksheet Functions | |||
"IF" statement & "strikethrough" formatting | Excel Worksheet Functions |