How to Insert Pictures in Excel That Automatically Size to Fit Cells

Download ArticleDownload 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 How.com.vn 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. How.com.vn English: Step 1  Open your project in Microsoft Excel.
    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. How.com.vn English: Step 2 Insert an image...
    Insert an image. You can do this by going to Insert > Pictures > Selecting your picture > Insert.
    Advertisement
  3. How.com.vn English: Step 3  Resize it.
    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. How.com.vn English: Step 4  Lock the image to the cell.
    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_SHAPEDim PicWtoHRatio As SingleDim CellWtoHRatio As SingleWith SelectionPicWtoHRatio = .Width / .HeightEnd WithWith Selection.TopLeftCellCellWtoHRatio = .Width / .RowHeightEnd WithSelect Case PicWtoHRatio / CellWtoHRatioCase Is > 1With Selection.Width = .TopLeftCell.Width.Height = .Width / PicWtoHRatioEnd WithCase ElseWith Selection.Height = .TopLeftCell.RowHeight.Width = .Height * PicWtoHRatioEnd WithEnd SelectWith Selection.Top = .TopLeftCell.Top.Left = .TopLeftCell.LeftEnd WithExit SubNOT_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?
    How.com.vn English: 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
200 characters left
Include your email address to get a message when this question is answered.
Submit
      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

      How.com.vn English: Darlene Antonelli, MA
      Written by:
      How.com.vn Technology Writer
      This article was co-authored by How.com.vn staff writer, Darlene Antonelli, MA. Darlene Antonelli is a Technology Writer and Editor for How.com.vn. Darlene has experience teaching college courses, writing technology-related articles, and working hands-on in the technology field. She earned an MA in Writing from Rowan University in 2012 and wrote her thesis on online communities and the personalities curated in such communities. This article has been viewed 188,175 times.
      How helpful is this?
      Co-authors: 7
      Updated: March 24, 2024
      Views: 188,175
      Categories: Microsoft Excel
      Article SummaryX

      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 188,175 times.

      Is this article up to date?

      ⚠️ Disclaimer:

      Content from Wiki How English language website. Text is available under the Creative Commons Attribution-Share Alike License; additional terms may apply.
      Wiki How does not encourage the violation of any laws, and cannot be responsible for any violations of such laws, should you link to this domain, or use, reproduce, or republish the information contained herein.

      Notices:
      • - A few of these subjects are frequently censored by educational, governmental, corporate, parental and other filtering schemes.
      • - Some articles may contain names, images, artworks or descriptions of events that some cultures restrict access to
      • - Please note: Wiki How does not give you opinion about the law, or advice about medical. If you need specific advice (for example, medical, legal, financial or risk management), please seek a professional who is licensed or knowledgeable in that area.
      • - Readers should not judge the importance of topics based on their coverage on Wiki How, nor think a topic is important just because it is the subject of a Wiki article.

      Advertisement