Image as text

  • Thread starter Thread starter Emece
  • Start date Start date
E

Emece

I have the following problem. I have a sheet in were I have an image that
corresponds to a code bar, with the drawing of the code and the code itself.
I need to use a function in an auxiliary column, in which I obtain the
drawing of the code bar, by entering the code itself. I tried using the
function vlookup, but as the code bar is an image, the result is 0. Is there
a way to transform the image to text?

Hope it is clear enough.

Regards,
Emece.-
 
You need to have a way to link the code to the image, either through the image name, or through a
lookup table. Then you can use and event, like the change event, to change the picture display using
code. Here is an example that I wrote long ago, on this page:

http://www.contextures.com/excelfiles.html

Look for this:

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
 
Bernie, thanks for your prompt reply. Your example is great and is what I
need, but I have some doubts in order to make it work properly. I replaced
the images in the example for my own images, but when I select the name in
the list in the dropdown list, the name of the object is displayed, and not
the image. My first question is: does the image has to be in a specific
format? The other question is how do I use the calculate event?

Thanks again

Regards
Emece.-
 
The image need to be inserted in the workbook, and it needs to be named the same as the value that
shows up in the cell.

For example, if you insert C:\My Pictures\YellowDog.jpg into the workbook, select it and look at
the name box (just above cell A1). Its Excel name will be shown, something like Picture 1. You
need to rename it, so select that name in the name box and change it by typing over the existing
name, using something more meaningful, like Dog. Then, in your values on your workbook, use Dog,
and the code will show a copy of that picture.

HTH,
Bernie
MS Excel MVP
 
Back
Top