+ Reply to Thread
Results 1 to 6 of 6

Display Image on Condition of Cell Value

  1. #1
    Registered User
    Join Date
    02-01-2012
    Location
    Ireland
    MS-Off Ver
    Excel 2007
    Posts
    44

    Display Image on Condition of Cell Value

    Hi all,

    I know this is a common question as I have seen numerous other threads on this topic. Unfortunately after hours of trial and error with these previous threads, nothing has been able to solve my problem.

    As the title suggests, I'm looking to generate a formula (or code), which would display an image dependent on a specific cell value.

    I have attached the example of what I am trying to do.

    Basically I have 7 options (as shown in sheet 1), and 7 images corresponding to these options (shown in sheet 2). I wish to display an image in sheet one that is dependent on the contents of cell B3 in Sheet1 i.e. B3=Risk 1 then the image shown will be Picture 1, if B3=Risk 2 then the image will be Picture 2 etc.

    Is there an easy way to solve this?

    Many thanks in advance.

    Display Image Conditional on Cell contents.xlsx

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Display Image on Condition of Cell Value

    Good day,

    Please refer attached.

    All display areas of the graphs (On Sheet2) have been assigned names viz. Chart1, Chart2, Chart3 and so on.

    On Sheet1, Cell N3 determines the chart to be displayed based on selection in Cell B3.

    The 'Pic' name has been defined as an INDIRECT function based on the value in N3 and produces the desired result.
    Attached Files Attached Files
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Registered User
    Join Date
    02-01-2012
    Location
    Ireland
    MS-Off Ver
    Excel 2007
    Posts
    44

    Re: Display Image on Condition of Cell Value

    Thank you very much. Very helpful and ended a pretty excessive journey for me :-)

  4. #4
    Forum Contributor
    Join Date
    01-11-2012
    Location
    usa
    MS-Off Ver
    Excel 2007
    Posts
    133

    Re: Display Image on Condition of Cell Value

    This would work grate for my project as well except I need to change the image and "Risk" to something else. Can you walk me through it? I couldn't find any macros or vba to make changes. Much appreciate your help.
    Thanks

  5. #5
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Display Image on Condition of Cell Value

    There are no macros or VBA my friend!

    It works on the basis of defined name ranges viz. Chart1, Chart2, Chart3 and so on! The final display chart too is a defined name range fondly named 'Pic' and uses the INDIRECT formula to pick the relevant chart.

    Use Alt+I+N+D to see all the 'names' defined or go to 'Formulas' --> 'Name Manager' depending on which version of excel you are using. Once you get the concept, it should be easy to muck around and achieve what you need.

    Let me know if this helps!

  6. #6
    Forum Contributor
    Join Date
    01-11-2012
    Location
    usa
    MS-Off Ver
    Excel 2007
    Posts
    133

    Re: Display Image on Condition of Cell Value

    [I] still can't figure out how to change the names, "Risk 1, 2,3...". I need only 4 of the images and deleted the rest and everything works fine. Never knew about the name manager. Thanks for the education.

+ 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