PDF download Download Article PDF download Download Article

Do you have an image or logo that you want to add to your Excel sheet to make it more visually appealing? While there is no automatic setting that will resize your image inside a cell, you can do it yourself with a few clicks. This wikiHow article will teach you how to insert pictures in Excel and size them to fit into cells.

Sizing Pictures to Fit Cells in Excel

While Excel doesn't have a setting that automatically resizes images, you can achieve the same result by setting the size of the image to fit the cell and then locking the image to the cell. When you change the size of the cell, the size of the image will change as well.

  1. You can do this by going to File > Open within Excel or you can right-click the project file and select Open with > Excel .
  2. Insert an image . You can do this by going to Insert > Pictures > Selecting your picture > Insert .
    Advertisement
  3. When you have the image selected, you'll see a "Size" grouping under "Format" and "Picture Tools."
    • Change the Height and Width to adjust the size of your image. Instead, you can drag and drop the corners of the image to re-adjust the size.
  4. By default, the image you added "floats" above your cells and doesn't change size as your cells do. To fix this, you need to lock the image or the cell.
    • Right-click your picture and click Format Picture . Then click the "Size & Properties" tab (a symbol with a green square with arrows around it) and select Move and size with cells .
      • You can also use a VBA code after you've inserted some pictures. Insert the images and press Alt + F11 to open the VBA window. Click Insert > Module and paste the following code:
      • Public Sub FitPic()
        On Error GoTo NOT_SHAPE
        Dim PicWtoHRatio As Single
        Dim CellWtoHRatio As Single
        With Selection
        PicWtoHRatio = .Width / .Height
        End With
        With Selection.TopLeftCell
        CellWtoHRatio = .Width / .RowHeight
        End With
        Select Case PicWtoHRatio / CellWtoHRatio
        Case Is > 1
        With Selection
        .Width = .TopLeftCell.Width
        .Height = .Width / PicWtoHRatio
        End With
        Case Else
        With Selection
        .Height = .TopLeftCell.RowHeight
        .Width = .Height * PicWtoHRatio
        End With
        End Select
        With Selection
        .Top = .TopLeftCell.Top
        .Left = .TopLeftCell.Left
        End With
        Exit Sub
        NOT_SHAPE:
        MsgBox "Select a picture before running this macro."
        End Sub
    • Press F5 to run the code and repeat this process until all the images in your sheet fit into cells.
  5. Advertisement


Community Q&A

Search
Add New Question
  • Question
    When I resize a picture to a smaller cell and then restore it, I lose the detail. How can I avoid this?
    CJ89483
    Community Answer
    When you resize an image to a smaller size and then restore it to its original size, the image may lose some of its detail and sharpness. To avoid this, it is best to start with the original high-resolution image and use good-quality resizing software that includes bicubic interpolation. Bicubic interpolation is a resizing method that helps preserve detail and sharpness in the image. It is also important to avoid resizing the image too much and to save a copy of the original image. By following these tips, you can help ensure that your images retain their detail and quality when resized.
Ask a Question
      Advertisement

      Video

      Tips

      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Thanks for submitting a tip for review!

      About This Article

      Article Summary X

      1. Open your project in Microsoft Excel.
      2. Insert an image.
      3. Resize it.
      4. Lock the image to the cell.

      Did this summary help you?
      Thanks to all authors for creating a page that has been read 202,120 times.

      Is this article up to date?

      Advertisement