+ Reply to Thread
Results 1 to 5 of 5

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

  1. #1
    Jonathan Neubauer
    Guest

    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

  2. #2
    Tom Ogilvy
    Guest

    Re: 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 [email protected]> wrote in
    message news:[email protected]...
    > 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




  3. #3
    Jonathan Neubauer
    Guest

    Re: 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 [email protected]> wrote in
    > message news:[email protected]...
    > > 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

    >
    >
    >


  4. #4
    Jonathan Neubauer
    Guest

    Re: 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 [email protected]> wrote in
    > > message news:[email protected]...
    > > > 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

    > >
    > >
    > >


  5. #5
    Jonathan Neubauer
    Guest

    RE: 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


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1