ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Conditional display of a .jpeg file? (https://www.excelbanter.com/excel-discussion-misc-queries/727-conditional-display-jpeg-file.html)

sbhogle

Conditional display of a .jpeg file?
 
Here's the question: Is it possible to have Excel display a .jpeg or .gif
image based on a conditional value in a cell?

Example: If A1=5 then display abc.jpeg if not, display nothing.

Here's the application: My end users copy and paste from a "green screen"
to Excel. Excel manipulates the data and creates a sheet that can be printed
out and reviewed with our clients. In this case, the "green screen" has an
indicator to designate whether our client is a Five Star Dealer or not.

I know that I can reference a cell to display "Five Star Dealer" but it
would much cooler if I could use the Five Star logo.

Even better, is there a way to change the formatting of a line chart to
conditionally insert the Five Star logo?

Thanks in advance for any help/suggestions that may be offered.


SBH

JE McGimpsey

You'll have to use VBA to do this. You may be able to adapt the
technique here

http://www.mcgimpsey.com/excel/lookuppics.html

Perhaps something like:


Private Sub Worksheet_Calculate()
Me.Pictures.Visible = False
With Range("A1")
If IsNumeric(.Value) Then _
Me.Pictures("abc").Visible = .Value = 5
End With
End Sub





In article ,
"sbhogle" wrote:

Here's the question: Is it possible to have Excel display a .jpeg or .gif
image based on a conditional value in a cell?

Example: If A1=5 then display abc.jpeg if not, display nothing.

Here's the application: My end users copy and paste from a "green screen"
to Excel. Excel manipulates the data and creates a sheet that can be printed
out and reviewed with our clients. In this case, the "green screen" has an
indicator to designate whether our client is a Five Star Dealer or not.

I know that I can reference a cell to display "Five Star Dealer" but it
would much cooler if I could use the Five Star logo.

Even better, is there a way to change the formatting of a line chart to
conditionally insert the Five Star logo?

Thanks in advance for any help/suggestions that may be offered.


sbhogle

Thanks for the help.....

I don't know much about Visual Basic, but I've always wanted to learn more -
maybe now's the time.

Thanks again for the help and have a great week.


SBH

"JE McGimpsey" wrote:

You'll have to use VBA to do this. You may be able to adapt the
technique here

http://www.mcgimpsey.com/excel/lookuppics.html

Perhaps something like:


Private Sub Worksheet_Calculate()
Me.Pictures.Visible = False
With Range("A1")
If IsNumeric(.Value) Then _
Me.Pictures("abc").Visible = .Value = 5
End With
End Sub





In article ,
"sbhogle" wrote:

Here's the question: Is it possible to have Excel display a .jpeg or .gif
image based on a conditional value in a cell?

Example: If A1=5 then display abc.jpeg if not, display nothing.

Here's the application: My end users copy and paste from a "green screen"
to Excel. Excel manipulates the data and creates a sheet that can be printed
out and reviewed with our clients. In this case, the "green screen" has an
indicator to designate whether our client is a Five Star Dealer or not.

I know that I can reference a cell to display "Five Star Dealer" but it
would much cooler if I could use the Five Star logo.

Even better, is there a way to change the formatting of a line chart to
conditionally insert the Five Star logo?

Thanks in advance for any help/suggestions that may be offered.




All times are GMT +1. The time now is 11:51 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com