Darren Young
Darren Young

Reputation: 11090

Finding image location on Excel

Say if I have an excel spreadsheet with an image overlaid. Obviously they are not embedded to any cell and are instead laid over the spreadsheet.

How would I find the cell locations that the image lies on? Is there anyway to do this?

Upvotes: 5

Views: 2238

Answers (1)

Mike Woodhouse
Mike Woodhouse

Reputation: 52326

You can examine the Shapes collection in your worksheet. You may still need to figure out which one is interesting if there are many, though. In VBA you might start with something like:

Sub Macro1()

    Dim o As Shape

    For Each o In Sheet1.Shapes
        Debug.Print o.Name, o.TopLeftCell.Address, o.BottomRightCell.Address
    Next

End Sub

Upvotes: 3

Related Questions