How do I have an image in a cell based upon a referenced value?

J

Jonathan Neubauer

What I want to do is have an image of a particular schematic inserted in the
worksheet based upon a referenced cell.

For instance, if A1 equals 10, that would mean I have a 10 pile group.
Therefore throughout the spreadsheet I want images that are applicable to the
10 pile group.

I don't mind if there is a seperate worksheet within the spreadheet where
all of the images are located.

But basically, I want the images to change based upon a calculated value.

Thanks in advance!

Jonathan
 
J

Jonathan Neubauer

How can I use images within the spreadsheet so I don't have to be computer or
directory specific?

I am comfortable with macros- so that solution would work well if I can pull
the images from a worksheet from within the spreadsheet.

Thanks!

Jonathan
 
J

Jonathan Neubauer

I can do it with the copy/paste routine- thanks for the suggestion!

Jonathan
 
J

Jonathan Neubauer

Here is the code I came up with if anyone else is looking for a similar
solution:

Dim ValueA As Integer

Sheets("Practice").Select
ValueA = Range("B6").Value


If ValueA = 1 Then

Sheets("Practice").Select
ActiveSheet.Shapes("Image_Cell_01").Select
Selection.Delete
Sheets("Images").Select
ActiveSheet.Shapes("Image_PC_01").Select
Selection.Copy
Sheets("Practice").Select
Range("C11").Select
ActiveSheet.Paste
Sheets("Practice").Select
ActiveSheet.Shapes("Image_PC_01").Select
Selection.Name = "Image_Cell_01"

ElseIf ValueA = 2 Then

Sheets("Practice").Select
ActiveSheet.Shapes("Image_Cell_01").Select
Selection.Delete
Sheets("Images").Select
ActiveSheet.Shapes("Image_PC_02").Select
Selection.Copy
Sheets("Practice").Select
Range("C11").Select
ActiveSheet.Paste
Sheets("Practice").Select
ActiveSheet.Shapes("Image_PC_02").Select
Selection.Name = "Image_Cell_01"

End If
 

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

Top