Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Mar 2006
    Posts
    76
    Thanks
    6
    Thanked 0 Times in 0 Posts


    Is there a way to have the result of a formula display a picture (gif or jpg) rather than the numeric result of the formula?

    I have a formula which compares this year's results against last year's and instead of having the numeric answer displayed, in the cell, I'd like to show a trophy (jpg) for the winner and a donkey (jpg) for the loser.

    I'm thinking some type of "If" formula, but pulling in the image has me stumped, not sure if it's even possible.

    Any help would be greatly appreciated!
    Thanks,
    Tom

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    Formulas can't return a picture, but you can simulate it using the camera tool and a named formula.

    In the attached workbook, the values Yes and No and corresponding pictures have been placed in A30:B31.
    Cell B1 has validation of type List with Allow set to =$A$30:$A$31 (the cells containing Yes and No).
    The named formula Pic refers to =INDEX(Sheet!$B$30:$B$31,MATCH(Sheet!$B$1,Sheet!$A $30:$A$31,0)) (see Insert | Name | Define...)
    This formula returns cell B30 if B1 is Yes and B31 if B1 is No
    The camera tool has been used to create a picture that has been placed over cell B3. With this picture selected, I entered =Pic in the formula bar. This links the picture to the outcome of the named formula: either B30 or B31.

    See for example Using Excel's Camera Tool for more info.
    Attached Files Attached Files

  3. #3
    Star Lounger
    Join Date
    Mar 2006
    Posts
    76
    Thanks
    6
    Thanked 0 Times in 0 Posts
    Thanks Hans, I love the idea!!

Posting Permissions

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