+ Reply to Thread
Results 1 to 5 of 5

Picture based on cell content

  1. #1
    Registered User
    Join Date
    07-16-2007
    Posts
    30

    Picture based on cell content

    Hi - I'm trying to get a picture to appear on a worksheet that will dynamically change based on the contents of a cell. I can get it to work ok using named ranges and the camera option, but I'm limited to 255 chanacters and 7 nested IF statements in the 'Refers to' option of my name.

    Can anyone recommend a way to do this please using VB or something simillar?

    Example would be:

    Cell with a name in it, and depending on the name in the cell the persons photo to appear on the same worksheet. All photos to be stored in the Workbook.

    Thank you.

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Hi,

    Sites down at the moment but when it's back up try

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

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Registered User
    Join Date
    07-16-2007
    Posts
    30
    Thanks - I tried the solution from that site a few days ago, but couldn't refer back to it as it was down. Based on what was on that site I had got this to work to an extent, but had given up on it in the hope of a better (easier to understand) method.

    In this attached file I can get this to work if I only require one picture per sheet, but in this example I want to display 2 of them.

    Can you give me any pointers on how I change the VB code to get it to work to get a different pic to display if I change the value in cell A14, as well as retaining the one called from cell A2, so.....

    I change the name in cell A2 and get the pic for that, then change the name in cell A14 and get the pic for that one as well.

    I know nothing at all about VB, so I'm struggling to understand it.
    Attached Files Attached Files
    Last edited by JEB; 07-16-2007 at 05:55 PM.

  4. #4
    Registered User
    Join Date
    07-16-2007
    Posts
    30
    Sorry folks - can anyone help me out with this one please?

  5. #5
    Registered User
    Join Date
    07-16-2007
    Posts
    30
    Someone has helped me out with this, so I thought I'd ppst the solution incase it is of use to anyone else. Code required is:

    Please Login or Register  to view this content.
    A picture won't be displayed if both cells are set to the same value.
    Last edited by VBA Noob; 02-27-2008 at 07:24 PM.

+ 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