Formula produces picture file...?

M

miwarren

I was wondering is there any way to create a formula that would generat
a picture file.

For example IF(A1>1,flag.gif,"")

I know this doesn't work but I think you might understand what I a
wanting from the formula. Thanks for you help!

miwarre
 
R

Ron Coderre

For a VBA solution, this is the generally accepted best method:
http://www.mcgimpsey.com/excel/lookuppics.html

For a non-VBA solution:
Assumption: Pictures are stored on Sheet2 to be dynamicly shown on
Sheet1.

1)Set the fill color for every cell on Sheet2 to White, then:
For each picture to be displayed:
1a. Insert>Picture from file. (select your picture and put it in the
sheet).
1b. Select the range of cells that contains the picture and name it so
it includes the prefix "pic" followed by the text that the dropdown
will display:
Example:
Insert>Name>Define
Name: picCadillac

2)Build your data validation list on a cell in Sheet1 and pick one of
the items.
(Cadillac, Ford, Honda, etc)

3)Create a dynamic range name that refers to that cell:
Insert>Name>Define
Name: ShowMyPic
RefersTo: =INDIRECT("pic"&Sheet1!$A$1)
...or whatever cell you chose.

4)Copy/Paste any one of the pictures from Sheet2 into the cell on
Sheet1 where you want pictures to display.

5)With picture selected, type this in the formula bar, then press
[Enter]:
=ShowMyPic

The picture will be replaced by the picture referred to by the dropdown
list.

Each time you select a different item in the list, the associated
picture will appear in the picture box and resize appropriately.

Hopefully one of those methods will work for you.

Regards,
Ron
 
Top