#1   Report Post  
needsomehelp
 
Posts: n/a
Default Conditional Pictures


How can I change a picture that is displayed in excel depending on a
confition?? I.e. if a cell value is one I want to display a picture of
an apple next to it - if it is 2 I want to display a picture of an
orange next to it (simplified example obviously!!). I know that I can
do this with a macro - but I want the picture to change automatically
as the cell value changes without having to start a macro.

Any help would be appreciated!! Thanks


--
needsomehelp
------------------------------------------------------------------------
needsomehelp's Profile: http://www.excelforum.com/member.php...o&userid=28761
View this thread: http://www.excelforum.com/showthread...hreadid=484504

  #3   Report Post  
damorrison
 
Posts: n/a
Default Conditional Pictures

how about this:
If Selection.Value=1
'your code
elseif Selection.value = 2
'code here
end if
you can do some customizing, such as a worksheet change event
and then you would have to target that address so it only works in a
certain range if you need help with that one let us know
dave

  #4   Report Post  
Ron Coderre
 
Posts: n/a
Default Conditional Pictures


For a non-VBA solution:

I'll assume you want to store the pictures on Sheet2 and show them 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 text that the dropdown will display:
Example:
If an item in the list will be "Camel" and the selection is a picture
is of a Camel:
InsertNameDefine
Name: picCamel

2)Build your data validation list on a cell in Sheet1 and pick one of
the items.

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)While the picture is still 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.

Is that something you can work with?

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=484504

  #5   Report Post  
Dave Peterson
 
Posts: n/a
Default Conditional Pictures

One mo

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



needsomehelp wrote:

How can I change a picture that is displayed in excel depending on a
confition?? I.e. if a cell value is one I want to display a picture of
an apple next to it - if it is 2 I want to display a picture of an
orange next to it (simplified example obviously!!). I know that I can
do this with a macro - but I want the picture to change automatically
as the cell value changes without having to start a macro.

Any help would be appreciated!! Thanks

--
needsomehelp
------------------------------------------------------------------------
needsomehelp's Profile: http://www.excelforum.com/member.php...o&userid=28761
View this thread: http://www.excelforum.com/showthread...hreadid=484504


--

Dave Peterson


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional formula - language needed gamebird Excel Worksheet Functions 7 October 10th 05 11:48 PM
Conditional formatting...cont. from 9/25 Guenzak Excel Discussion (Misc queries) 4 September 26th 05 10:55 PM
VLOOKUP & Conditional Formating Help. Excel'ed Failures Excel Discussion (Misc queries) 6 August 16th 05 04:46 PM
How do i create a conditional sum? tmiller708 Excel Worksheet Functions 2 May 5th 05 01:58 AM
Conditional formatting not available in Excel BAB Excel Discussion (Misc queries) 2 January 1st 05 03:33 PM


All times are GMT +1. The time now is 02:33 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"