IF Statement calls for a picture

Joined
Jan 22, 2017
Messages
20
Reaction score
0
I've created a simple spreadsheet that produces a Profit/Loss. By manually changing the values in the cells, it is possible that a Loss will result. If it does, in an adjacent cell, I would like a "sad face" to appear. So, I got a sad face emoji and placed it in a cell on Sheet 2 of the same workbook. I named that cell "SadFace." I then wrote the following formula on Sheet 1

=IF(I17<0,"SadFace","")

However, the result of that is that the words "SadFace" appear, not the picture. Is there any way to accomplish what I am trying to do? Perhaps the IF Statement is not the right way. Any help would be appreciated.
 

Regedit32

Moderator
Joined
Mar 4, 2016
Messages
3,617
Reaction score
1,139
Hi,

You need to create a separate worksheet and in a Cell enter the word SadFace for the name, then on top tool bar click Tool > Insert Image and select the image, then adjust the cell height and width do the image fits.

Now you can use the macro equation in another worksheet to get the effect you want.

An article explains all this here: https://excel.tips.net/T003128_Displaying_Images_based_on_a_Result.html

Regards,

Regedit32
 
Joined
Jan 22, 2017
Messages
20
Reaction score
0
Thanks for the response, Regedit32. Of all the back and forth in the article, the one that makes the most sense to me is the reply by Gazza where he creates a simple VBA script. However, I tried it and it bombed. Don't know where I'm going to go now. Perhaps, I will reread the article and its addenda and see if I can make sense out of it.
 

Regedit32

Moderator
Joined
Mar 4, 2016
Messages
3,617
Reaction score
1,139
The VBA supplied is incomplete, where as the actual article has complete steps to achieve what you want, albeit somewhat tedious.

Don't forget that Excel only accepts certain image formats, so its plausible an emoji may not appear unless its saved in a format like .bmp, .gig, .jpeg, etcetera.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top