+ Reply to Thread
Results 1 to 6 of 6

Excel 2009, Picture as per value

  1. #1
    Registered User
    Join Date
    02-04-2010
    Location
    Shanghai
    MS-Off Ver
    Office 2007
    Posts
    3

    Post Excel 2009, Picture as per value

    Hi.

    How to make a picture appear depending on a value in a cell?
    For example if the value is 1 then Picture no 1 is shown, and if the value is 2 then picture no one disappears and picture no 2 appears.

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Excel 2009, Picture as per value

    Hello GSN,

    welcome to the forum.

    What Excel version are you interested in? Excel 2009 is not on my list.

  3. #3
    Forum Contributor vikas.bhandari's Avatar
    Join Date
    04-07-2006
    Location
    Delhi, India
    MS-Off Ver
    Office 2007 and 2010
    Posts
    303

    Re: Excel 2009, Picture as per value

    Hi there!

    I assume you meant 2007. Anyways, I have created a, excel 2003 version file sample. I am sure it will work on your excel.

    Thanks,
    Vikas
    Attached Files Attached Files

  4. #4
    Forum Expert contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2013
    Posts
    1,430

    Re: Excel 2009, Picture as per value

    This task can be done by using excel OFFSET function.

    STEP 1 Creating photoalbum.

    On the first sheet of your workbook insert several images (say 3). Place in column A their names of countries (USA, Russia and Azerbaijan) and their flags next to names so that they would fit the cell, as you see in a screenshot.

    Now you have to give a name to our list to refer to it in the future. Go to the Insert - Name - Define (Formulas > Defined Name Define Name), enter the name (eg DynamicAlbum) and in address field type this formulae:

    Please Login or Register  to view this content.
    This formula defines the last cell in column A and displays the output range from A1 to that found cell. This relatively complex structure is needed to subsequently build is needed to enlarge or reduce used range automatically, not thinking of correction range all time. If you know that this is a fixed range (e.g you won't add any item in ColumnA in the future), you can simply point =A1:A3 instead of this formula.

    STEP 2 Create drop down list.

    Go to second sheet, select A1 and go to Data > Validation (Data > Data Tools > Data Validation). Select list from Allow drop-down and in Sorce field press F3 and select defined name DynamicAlbum.

    It is convinent to name the cell with validation list. Lets name it to DropDown.

    Please Login or Register  to view this content.
    Now you need to copy an image. To do that select the cell with the first photo and hold Shift key, click the Edit menu. There should now be an unseen before, Copy image command: Click on it (for xl2007 users select the cell with the first photo got Home > Clipboard > Paste > As Picture > Copy as Picture).
    Copy it and paste it on to second sheet in any blank cell.

    STEP 4 Creating Dynamic Reference to the phtolist.

    Now you need to make a dynamic link to the photo.

    Go to the Insert - Name - Define (Formulas > Defined Name Define Name), enter the name (eg PhotoList) and in address field type this formulae:

    Please Login or Register  to view this content.
    STEP 5 Tie the photo to the named formulae

    The only thing that remains, is to assign this name to the picture in second sheet sheet.
    Just select the picture and type in the formula bar

    Please Login or Register  to view this content.
    And Press Enter.

    SEE ATTACHED FILE
    Attached Files Attached Files
    Last edited by contaminated; 02-04-2010 at 04:41 AM.
    Люди, питающие благие намерения, как раз и становятся чудовищами.

    Regards, ?Born in USSR?
    Vusal M Dadashev

    Baku, Azerbaijan

  5. #5
    Registered User
    Join Date
    02-04-2010
    Location
    Shanghai
    MS-Off Ver
    Office 2007
    Posts
    3

    Re: Excel 2009, Picture as per value

    Hi.
    Yes I meant 2007.
    The sample does require you to push a button, but I want it to go automatically.
    I have 3 selections from a drop down menu that together will give a number. This number should then automatically retune a picture as illustrated in attached picture.

    Regards

    Gert


    Quote Originally Posted by vikas.bhandari View Post
    Hi there!

    I assume you meant 2007. Anyways, I have created a, excel 2003 version file sample. I am sure it will work on your excel.

    Thanks,
    Vikas
    Attached Images Attached Images

  6. #6
    Registered User
    Join Date
    02-04-2010
    Location
    Shanghai
    MS-Off Ver
    Office 2007
    Posts
    3

    Re: Excel 2009, Picture as per value

    Hi.

    I menant 2007.

    Tanks.
    Gert

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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