+ Reply to Thread
Results 1 to 4 of 4

Display image, from file, based on a cell value

  1. #1
    Registered User
    Join Date
    03-12-2013
    Location
    Uk
    MS-Off Ver
    Excel 2007
    Posts
    5

    Display image, from file, based on a cell value

    Hi,

    I need to be able to call up an image file based on a cell value.

    Quite simply, if cell A1 has "1" in it cell A2 displays an image called 1.jpg, if cell A1 has "2" in it cell A2 displays an image called 2.jpg

    I've seen many solutions putting all the pictures in a different sheet but this method will not work with the sheet/images i need. I need to call up the images from the same folder as the workbook.

    Any help greatly appreciated.

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Display image, from file, based on a cell value

    can you attach a sample file with the best code you tested ?
    If solved remember to mark Thread as solved

  3. #3
    Registered User
    Join Date
    03-12-2013
    Location
    Uk
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Display image, from file, based on a cell value

    Hi,

    Special Example2.xlsm

    Attached is the file.

    I'm trying to do two things. In an ideal world cell F4 would display a thumbnail of the image that could be clicked on to link to the file. All other cells except C1 would be locked and unselectable.

    Failing that i would like the sheet to be fully protected and unselectable except cell C1. The problem i have with this is that when protecting cell F4 (locked cell not selectable) the hyperlink does not work.

    I know i can protect the cell and have it clickable to get around this but, an this is more of an aesthetic choice, i would ideally like no cells other than C1 to be selectable and still have the hyperlink in cell F4 working.

    Thanks for your time.

  4. #4
    Registered User
    Join Date
    08-19-2012
    Location
    Townsville
    MS-Off Ver
    Excel 2010
    Posts
    6

    Post Re: Display image, from file, based on a cell value

    I have done a spreadsheet that looks up a picture file based on a reference number (for an ID Card). I'm not sure if the code is much use to you, but there may be a few bits you can use. I'm very much a newbie.
    I have a picture called "No Image Available.jpg" which is placed on the card if there is no picture that matches the reference number.

    Use the code as you wish... there is a bit of other stuff there as well.

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1