SOLVED

Insert a conditional image into a cell

Copper Contributor

Hello everyone,

I have two questions and I'm struggling to find the answer. How can I insert an image into an Excel 365 cell without using macros? Additionally, I want the image in cell B5 to change based on the value in cell A5, all without using macros.

Thank you very much for your help that will save my life.

8 Replies

@LiliaDubois 

Recent versions of Microsoft 365 have a new function IMAGE 

How will the image in cell B5 depend on the value in A5?

Thank you very much but IMAGE works only with WEB URL and not with images in local storage 😞
How will the image in cell B5 depend on the value in A5 : I want that the displayed image on the cell B5 changes depending on the value in the cell A5, it's like VLOOKUP but with images

@LiliaDubois

Here is an example (requires Microsoft 365)

best response confirmed by LiliaDubois (Copper Contributor)
Solution

@LiliaDubois 

Here is an example that works with images stored in the workbook itself.

@HansVogelaar  Ooooh, thank you so much, this is exactly what I need ❤️ can you just please tell me the details, I'm really grateful 

@LiliaDubois 

The picture over cell B5 has been created using the Camera Tool 

I also created a defined name Pic. You can see its definition in Formulas > Name Manager: it refers to

 

=INDEX(Sheet!$B$30:$B$31,MATCH(Sheet!$A$5,Sheet!$A$30:$A$31,0))

 

It looks up the cell containing the picture corresponding to the description in A5.

I selected the picture over B5 and entered the formula =Pic in the formula bar. This is the "magic" that causes the image to change depending on the value of A5.

Thank you very much !!
1 best response

Accepted Solutions
best response confirmed by LiliaDubois (Copper Contributor)
Solution

@LiliaDubois 

Here is an example that works with images stored in the workbook itself.

View solution in original post