In Excel 2007, is there a way to place an image into a cell directly so it automatically resizes that the size of the cell?

Posted on 2011-04-19
Medium Priority
Last Modified: 2012-05-11
In Excel 2007, is there a way to place an image into a cell directly so it automatically resizes that the size of the cell?
Question by:SFWMD_IT

Author Comment

ID: 35426218
I am aware you can manually set the width and hiegt of the image to the size of a cell, but is there a way to "kind of like" snap to a cell size, so if you make the cell larger, then the image will also enlarge?
LVL 11

Expert Comment

ID: 35426270
Not that I'm aware of.

You can insert an image and it will 'float' across the cells.

What context are you hoping to insert a picture?  Are you creating a form and want to insert a letterhead or such?
LVL 11

Expert Comment

ID: 35426274
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

LVL 33

Expert Comment

ID: 35426288

Expert Comment

ID: 35426294
in the image properties you can select "move and size with cell"  I think thats about the best you can get.  It will shrink with the cell but I dont think you can make it stretch beyonds its original size if you make the cell larger
LVL 30

Expert Comment

ID: 35426706
SFWMD_IT: In the cell 'No' but as Plantwiz mentioned you can cover the relevant Cell/Cells. You can also increase or decrease the size of the picture beyond it's original size but you will have to take care of it's "lock Aspect Ratio"

LVL 30

Accepted Solution

SiddharthRout earned 1200 total points
ID: 35426768
Here is an example


Code Used

Private Sub CommandButton1_Click()
    Dim tp As Double, lft As Double, wdt As Double, ht As Double
    With Range("C5")
        tp = .Top
        lft = .Left
        wdt = .Width
        ht = .Height
    End With
    With Shapes("Picture 1")
        .LockAspectRatio = msoFalse
        .Top = tp
        .Left = lft
        .Width = wdt
        .Height = ht
    End With
End Sub

Open in new window

LVL 24

Expert Comment

ID: 35821806
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question