ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How do I have an image in a cell based upon a referenced value? (https://www.excelbanter.com/excel-programming/321993-how-do-i-have-image-cell-based-upon-referenced-value.html)

Jonathan Neubauer

How do I have an image in a cell based upon a referenced value?
 
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

Tom Ogilvy

How do I have an image in a cell based upon a referenced value?
 
use the change event to run code to insert your images. Turn on the macro
recorder while you insert and position the image manually to get the code.

See Chip Pearson's page on events if you are not familiar with them
http://www.cpearson.com/excel/events.htm

--
Regards,
Tom Ogilvy

"Jonathan Neubauer" <Jonathan wrote in
message ...
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




Jonathan Neubauer[_2_]

How do I have an image in a cell based upon a referenced value
 
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

"Tom Ogilvy" wrote:

use the change event to run code to insert your images. Turn on the macro
recorder while you insert and position the image manually to get the code.

See Chip Pearson's page on events if you are not familiar with them
http://www.cpearson.com/excel/events.htm

--
Regards,
Tom Ogilvy

"Jonathan Neubauer" <Jonathan wrote in
message ...
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





Jonathan Neubauer[_2_]

How do I have an image in a cell based upon a referenced value
 
I can do it with the copy/paste routine- thanks for the suggestion!

Jonathan

"Jonathan Neubauer" wrote:

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

"Tom Ogilvy" wrote:

use the change event to run code to insert your images. Turn on the macro
recorder while you insert and position the image manually to get the code.

See Chip Pearson's page on events if you are not familiar with them
http://www.cpearson.com/excel/events.htm

--
Regards,
Tom Ogilvy

"Jonathan Neubauer" <Jonathan wrote in
message ...
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





Jonathan Neubauer[_2_]

How do I have an image in a cell based upon a referenced value?
 
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



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

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