简体   繁体   中英

Formula for inserting a thumbnail picture into excel cell, based on another cell's value

In connection with another problem, I need to do the following:

if the value of cell A1 is greater than 100, cell C1 will show a thumbnail image of my face. If the value of cell A1 is less than 100, cell C1 will show a thumbnail image of my friends face.

The thumbnails of the faces are PNGs and are stored on my desktop.

I am trying to accomplish with without the use of Macros. In my mind, there might be some formula such as

=IF(A1>100,SETCELLIMG(c:\\users...\\Desktop\\myface.png))

I know how to cut-and-paste a *.png thumbnail into a cell, but the instructions I have require the mouse in a drag-and-drop fashion. Also, the instructions I have do not allow the thumbnail to change based on some other cell's value. It is unclear to me if this is even possible in excel.

This rather ludicrous problem is actually a proof-of-concept for how I am going to solve another problem.

Here is a really excellent tutorial on how to lookup an image contained in a cell: https://www.excelguru.ca/content.php?279-VLOOKUP-for-Pictures

These are the basic steps of it -

  1. Create a Picture Table
  2. Setting Up the Driver Cell(s)
  3. The Picture Lookup

Instead of having a range of weather types, you would have a Picture Table that would include pictures of you and your friend, and the Driver Cells would have the same names as you defined in that Picture table.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM