ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Formula produces picture file...? (https://www.excelbanter.com/excel-worksheet-functions/62113-formula-produces-picture-file.html)

miwarren

Formula produces picture file...?
 

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

For example IF(A11,flag.gif,"")

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

miwarren


--
miwarren
------------------------------------------------------------------------
miwarren's Profile: http://www.excelforum.com/member.php...o&userid=24682
View this thread: http://www.excelforum.com/showthread...hreadid=496396


Ron Coderre

Formula produces picture file...?
 

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. InsertPicture 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:
InsertNameDefine
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:
InsertNameDefine
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


--
Ron Coderre
------------------------------------------------------------------------
Ron Coderre's Profile: http://www.excelforum.com/member.php...o&userid=21419
View this thread: http://www.excelforum.com/showthread...hreadid=496396


Dave Peterson

Formula produces picture file...?
 
Maybe....

You may want to look at J.E. McGimpsey's routine:
http://www.mcgimpsey.com/excel/lookuppics.html


miwarren wrote:

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

For example IF(A11,flag.gif,"")

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

miwarren

--
miwarren
------------------------------------------------------------------------
miwarren's Profile: http://www.excelforum.com/member.php...o&userid=24682
View this thread: http://www.excelforum.com/showthread...hreadid=496396


--

Dave Peterson


All times are GMT +1. The time now is 11:47 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com