Forum Discussion

Coolkinkster0001's avatar
Coolkinkster0001
Copper Contributor
Mar 14, 2022
Solved

using if or vllookup to insert an image conditionally

I am trying to insert an image into a spreadsheet from a conditional formula.

 

As example:

 

=If(Moon = "Full",Image1,if(moon ="New",Image2,NoImage)

 

Image1 = Full Moon.jpeg

Image2 = New Moon.jpeg

No Image = (Blank Cell)

  • Coolkinkster0001 

    I don't know of any way to insert an image using VLOOKUP or any other standard function.

    But you can define a function yourself and accordingly insert images after selection.

     

    Here is a small example file how to do it.

     

    It could also be done with VBA.

     

    I would be happy to know if I could help.

     

    NikolinoDE

    I know I don't know anything (Socrates)

    Was the answer useful? Mark them as helpful!

    This will help all forum participants.

     

3 Replies

  • NikolinoDE's avatar
    NikolinoDE
    Platinum Contributor

    Coolkinkster0001 

    I don't know of any way to insert an image using VLOOKUP or any other standard function.

    But you can define a function yourself and accordingly insert images after selection.

     

    Here is a small example file how to do it.

     

    It could also be done with VBA.

     

    I would be happy to know if I could help.

     

    NikolinoDE

    I know I don't know anything (Socrates)

    Was the answer useful? Mark them as helpful!

    This will help all forum participants.

     

    • Coolkinkster0001's avatar
      Coolkinkster0001
      Copper Contributor
      Thank you for your response. I am not a programmer but I do okay with Excel.

      If I understand you correctly I set up a separate spreadsheet with the photo and the "Yes" response will call that spreadsheet thus inserting the photo.

      Since I saw the number "1" with the photo may I use the same spreadsheet for all the photos by assigning different numbers or do I need a separate spreadsheet for each photo?
      • NikolinoDE's avatar
        NikolinoDE
        Platinum Contributor
        Please look in the name manager. No you dont need necessarily the numbering.

Resources