Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / June 2007

Tip: Looking for answers? Try searching our database.

Vlookup with Images

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike Langensiepen - 02 Jun 2007 01:30 GMT
I'm currently using vlookup to select paragraphs of information depending on
a dropdown list. The vlookup refers to an array in another sheet.

Is there any way of showing an image as well so that when I pick from a
dropdown list, it selects an image from one of the cells in the lookup
array?

Thanks

Mike
Gord Dibben - 02 Jun 2007 04:14 GMT
Mike

Yes, there is a way.

You can employ event code and VLOOKUP with Data Validation list selection
to choose which picture to show?

See JE McGimpsey's site for more on lookuppics and a sample workbook.

http://www.mcgimpsey.com/excel/lookuppics.html

Gord Dibben  MS Excel MVP

>I'm currently using vlookup to select paragraphs of information depending on
>a dropdown list. The vlookup refers to an array in another sheet.
[quoted text clipped - 6 lines]
>
>Mike
Ron Coderre - 02 Jun 2007 04:25 GMT
The VBA solution provided by JE McGimpsey is the generally accepted best
approach:
http://www.mcgimpsey.com/excel/lookuppics.html

However, as a new user, if you're not quite ready to jump into the VBA
programming pool this is an alternative non-VBA solution:

Assumption: Pictures are stored on Sheet2 to be dynamically shown on Sheet1.

Select Sheet2 and turn off Grid Lines
(Tools>Options>View tab:Uncheck Grid Lines)
1)For each picture to be displayed:
  1a. Insert>Picture from file. (select picture and put it in the sheet).
  1b. Select the range of cells that contains the picture.
  1c. Name that range of cells, using the prefix "pic" followed by the
dropdown list text:
Example for a picture of an Elephant:
Insert>Name>Define
Name: picElephant

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:
Insert>Name>Define
Name: ShowMyPic
RefersTo: =INDIRECT("pic"&Sheet1!$A$1)
...or whatever cell you chose.

4)Copy/Paste one of the pictures from Sheet2 to the display cell on Sheet1.

5)With the 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.

Is that something you can work with?

***********
Regards,
Ron

XL2002, WinXP

> I'm currently using vlookup to select paragraphs of information depending on
> a dropdown list. The vlookup refers to an array in another sheet.
[quoted text clipped - 6 lines]
>
> Mike
Gord Dibben - 02 Jun 2007 15:56 GMT
As coded, John's lookuppics allows for only one picture at a time to be
presented.

Bernie Dietrick sent me a slick workbook that allows multiple pictures to be
presented and selected from DV dropdowns.

Would be nice if one of the regulars with a site could provide this alternative
to John's lookuppics.

That would be dependent upon Bernie's permission, of course.

John, Ron, Bob, Debra.........anyone?

Gord Dibben  MS Excel MVP

>The VBA solution provided by JE McGimpsey is the generally accepted best
>approach:
>http://www.mcgimpsey.com/excel/lookuppics.html
Debra Dalgleish - 02 Jun 2007 16:44 GMT
If Bernie is interested, I could make it available on my site.

> As coded, John's lookuppics allows for only one picture at a time to be
> presented.
[quoted text clipped - 14 lines]
>>approach:
>>http://www.mcgimpsey.com/excel/lookuppics.html

Signature

Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html

Gord Dibben - 02 Jun 2007 17:46 GMT
Thanks Debra.

Re-posted in private.news hoping to catch Bernie over there.

Gord

>If Bernie is interested, I could make it available on my site.
>
[quoted text clipped - 16 lines]
>>>approach:
>>>http://www.mcgimpsey.com/excel/lookuppics.html
Andy Pope - 02 Jun 2007 17:10 GMT
Hi,

Here's a non vba solution from Jan Karel Pieterse.
http://www.jkp-ads.com/Articles/ShowPicture00.htm

Cheers
Andy

> I'm currently using vlookup to select paragraphs of information depending on
> a dropdown list. The vlookup refers to an array in another sheet.
[quoted text clipped - 6 lines]
>
> Mike
Mike Langensiepen - 05 Jun 2007 02:11 GMT
Thanks for the solutions offered. A non-VBA multi-event version is what I
need so I'll  either wait for Bernie or try the Jan karel solution.

Cheers

Mike

> I'm currently using vlookup to select paragraphs of information depending
> on a dropdown list. The vlookup refers to an array in another sheet.
[quoted text clipped - 6 lines]
>
> Mike
Gord Dibben - 05 Jun 2007 04:41 GMT
Mike

Bernie's solution that I spoke about involves VBA code.

There is no multi-event version without employing VBA.

What is the objection to to VBA?

Gord

>Thanks for the solutions offered. A non-VBA multi-event version is what I
>need so I'll  either wait for Bernie or try the Jan karel solution.
[quoted text clipped - 13 lines]
>>
>> Mike
Mike Langensiepen - 05 Jun 2007 03:02 GMT
Sorry Gord, I should have been more specific

VBA is OK if I don't have to modify code too much - my programming skills
terminated at QuickBasic!

> Mike
>
[quoted text clipped - 28 lines]
>>>
>>> Mike
Gord Dibben - 05 Jun 2007 16:46 GMT
Mike

VBA is a very powerful feature of the Office Applications.

Bernie's workbook involves event code which would not have to be changed in any
way.

The only changes to make would be to the DV dropdowns items and load in your
choices of images.

You can download from Debra Dalgleish's site

http://www.contextures.on.ca/excelfiles.html#DataVal

DV0049 - ClipArt Selection -- Select a clipart item from a data validation
dropdown list, and that picture appears in the adjacent cell. Uses
Worksheet_Calculate event code. Sample file from Bernie Deitrick.
ClipArtEvent.zip 30kb  03-Jun-07  

Gord

>Sorry Gord, I should have been more specific
>
[quoted text clipped - 33 lines]
>>>>
>>>> Mike
Mike Lang - 06 Jun 2007 08:19 GMT
Thanks Gord. Am I correct in saying that like the McGimpsey solution, this
has to have the images on the same page?

> Mike
>
[quoted text clipped - 62 lines]
>>>>>
>>>>> Mike
Gord Dibben - 06 Jun 2007 14:33 GMT
Correct..........same page.

Stick them waaayyyy over there somwhere like column IT.

Gord

>Thanks Gord. Am I correct in saying that like the McGimpsey solution, this
>has to have the images on the same page?
[quoted text clipped - 65 lines]
>>>>>>
>>>>>> Mike
Mike Langensiepen - 05 Jun 2007 03:03 GMT
OK I can see how this is done (even if I couldn't create it myself) but how
the heck do I display the hidden pictures?  Also is there an easy way of
storing the pics in another sheet (I like to keep my data entry sheets as
clean as possible)

Thanks and apologies if the question is stupid

Cheers

Mike

> I'm currently using vlookup to select paragraphs of information depending
> on a dropdown list. The vlookup refers to an array in another sheet.
[quoted text clipped - 6 lines]
>
> Mike
JE McGimpsey - 06 Jun 2007 00:37 GMT
> OK I can see how this is done (even if I couldn't create it myself) but how
> the heck do I display the hidden pictures?  

One way: In the VBE's Immediate Window, enter

   ActiveSheet.Pictures.Visible = True

> Also is there an easy way of
> storing the pics in another sheet (I like to keep my data entry sheets as
> clean as possible)

Pictures are displayed only on the drawing layer of the sheet they're
inserted into.
Mike Lang - 06 Jun 2007 08:18 GMT
> One way: In the VBE's Immediate Window, enter
>
>    ActiveSheet.Pictures.Visible = True

Thanks for this

>> Also is there an easy way of
>> storing the pics in another sheet (I like to keep my data entry sheets as
>> clean as possible)
>
> Pictures are displayed only on the drawing layer of the sheet they're
> inserted into.

Bugger! - I need about 1200 images each of 300x300 pixels!

Might be cut n paste after all.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.