Refereing to a picture in a excel cell

J

Jerry Manner

Hi

I am creating an excel template of which the first sheet has lots of
rows. Each row represents a record with data in it ( text, numers and
a small picture)
On the other sheets I refer to cells on the first sheet. I do that
with the formula ( for example) =Sheet1!P5.

This works fine for text and numbers but not for the picture. How can
I refer from another sheet to a cell on the first sheet that contains
a picture?

Any help will be appreciated.

Regards
 
P

paul.robinson

Hi

I am creating an excel template of which the first sheet has lots of
rows. Each row represents a record with data in it ( text, numers and
a small picture)
On the other sheets I refer to cells on the first sheet. I do that
with the formula ( for example) =Sheet1!P5.

This works fine for text and numbers but not for the picture. How can
I refer from another sheet to a cell on the first sheet that contains
a picture?

Any help will be appreciated.

Regards

Hi
Cells in excel don't contain pictures, so you cannot refer to the
picture in a cell. Pictures can have a position relative to a cell,
which you can capture using VBA. You would then have to copy the
picture and paste to a location on your new sheet - all a bit fiddly.
Access cells can contain pictures and other objects. Are you sure you
don't want to be in Access?

regards
Paul
 
J

Jerry Manner

Hi
Cells in excel don't contain pictures, so you cannot refer to the
picture in a cell. Pictures can have a position relative to a cell,
which you can capture using VBA. You would then have to copy the
picture and paste to a location on your new sheet - all a bit fiddly.
Access cells can contain pictures and other objects. Are you sure you
don't want to be in Access?

regards
Paul

Hi

The pictures ( and text and numbers) are inserted by an external
program on the first excelsheet. You said that a cell cannot contain a
picture, but I can use the Insert --> Picture to place a picture in a
cell. Or is that something different.
Access is not an option in my system.

Regards
 
P

paul.robinson

Hi

The pictures ( and text and numbers) are inserted by an external
program on the first excelsheet. You said that a cell cannot contain a
picture, but I can use the Insert --> Picture to place a picture in a
cell. Or is that something different.
Access is not an option in my system.

Regards- Hide quoted text -

- Show quoted text -

Hi
You will find that the picture is not "in" the cell. The picture has a
TopLeftCell property, which is the cell address of the top left corner
of the image. You can drag the image elsewhere on the sheet, so it is
not in the cell or attached to it in any way.
To capture a picture you would have to loop through all the pictures
on the sheet and check to see if the TopLeftCell of the picture is in
the row you are looking it. Then you could select that picture and
copy it to your new sheet. Things like comments and buttons count as
graphic objetcs too, so you would have to be careful not to include
those.
This can be done with VBA but not otherwise I think. Google this
newsgroup on "copy pictures in a range" or "delete pictures in a
range" to see some code.

regards
Paul
 

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