Skip to main content

4 Quick Ways: Auto-Size Pictures to Fit Cells in Excel

Inserting images in Excel that seamlessly fit into cells can elevate your data visualization, but manually adjusting each one? Tedious and time-consuming. Dive into this guide where we unravel 4 powerful methods to masterfully auto-size your pictures, transforming your spreadsheet experience.


Video: Auto size pictures to fit cells

 


Insert pictures into cells

 

Before resizing pictures to fit cells’ size, you should better insert the pictures into cells. If you have pictures within cells, please directly go to Resize pictures to fit cells to get the tricks on making images seamlessly fit into cells.

Step 1: Adjust the cells that you want to insert images into
  1. Select the cells then select Home > Format > Row Height, and in the popping dialog, type the height number you need. Click OK.
  2. Select Home > Format > Column Width, and in the popping dialog, type the width number you need. Click OK.
Step 2:  Import a picture
  1. Click on the cell that you want to insert an image into, then select Insert > Pictures, and navigate to an image file on your computer or utilize resources from Stock Images or Online. Here I select This Device.
  2. Find the desired image, and click Insert.
Step 3: Repeat above 2 steps to insert images to related cells one by one
Tip: If an image obscures a cell, making it difficult to select with the mouse, use the keyboard arrows to navigate and select the cell.
Result: All images are inserted into related cells

For those with pre-inserted images aiming to resize, move to the next section.


Resize pictures to fit cells

 

In Excel, there are three different methods to resize pictures to perfectly fit cells. Let's explore them now.

Resize pictures to fit cells by shortcut (one by one)

The widely used method to resize pictures to fit cells is probably dragging four corners of the image manually. However, for speed and precision, the shortcut Alt is recommended here.

A word of caution: This fills the entire cell with your image, so it might distort the image ratio.
Step 1: Select the image you intend to resize
Step 2: Use shortcut to resize
  1. Hover over the image's right-center circle until a double-arrow cursor appears.
  2. Hold the Alt key, drag the mouse to the left until the image's right edge aligns with the cell's right border, then release the cursor.
    alt 1
  3. Hover over the image's bottom-center circle until a double-arrow cursor appears.
  4. Hold the Alt key, drag the mouse to the top until the image's bottom edge aligns with the cell's bottom border, then release the cursor.
    alt 2
Result:

 

Resize pictures to fit cells by Format Picture pane (batch resize height or width)

To maintain consistency, especially with multiple images, use the Format Picture pane. Here, you can batch set multiple image heights or widths to align with cell heights or widths, ensuring uniformity.

Step 1: Select images
  1. Select Home > Find & Select > Selection Pane….
  2. In the Selection pane, hold Ctrl key to select the picture you want to resize together, or press Ctrl + A to select all objects you want to resize.
Step 2: Open Format Picture pane and set the height or width for all selected pictures
  1. Right click on any selected picture in the worksheet, choose Format Object from the context menu.
  2. Click Size & Properties tab in the pane, enter a height number or a width number into Height or Width textbox under Size section.
    doc auto size pictures to fit cells 13 1
  3. Press Enter key to finish the resize.
Result:

Pictures are resized based on a fixed height while maintaining the aspect ratio.

 

Resize pictures to fit cells by VBA code (batch resize, cannot undo)

For our Excel pros dealing with bulk images, VBA is your tool. Dive into the macros to resize either selected images or every single image in your worksheet. Much like Alt shortcut, this covers the cell fully but might affect the original proportions.

Step 1: Hold Ctrl key to select the images you want to resize to fit the cells
Attention: If you want to resize all images in the current sheet, skip this step and jump to Step 2.
Step 2: Press Alt + F11 keys to open Microsoft Visual Basic for Applications window
Step 3: Click Insert > Module and paste one of codes below into the blank script

Code 1: Resize selected images to fit cells

Sub ResizeSelectedPicturesToFitCells()
'UpdatebyExtendoffice
    Dim shp As Shape
    For Each shp In Selection.ShapeRange
        With shp
            .LockAspectRatio = msoFalse
            .Top = .TopLeftCell.Top
            .Left = .TopLeftCell.Left
            .Width = .TopLeftCell.Width
            .Height = .TopLeftCell.Height
        End With
    Next shp
End Sub

Code 2: Resize all images in the current sheet to fit cells

Sub ResizeImagesToFitCells()
'UpdatebyExtendoffice
    Dim pic As Picture
    For Each pic In ActiveSheet.Pictures
        With pic
            .ShapeRange.LockAspectRatio = msoFalse
            .Top = .TopLeftCell.Top
            .Left = .TopLeftCell.Left
            .Width = .TopLeftCell.Width
            .Height = .TopLeftCell.Height
        End With
    Next pic
End Sub
Step 4: Press F5 key or click run button doc run to run the code
Result:

Code 1: Resize selected images to fit cells

doc auto size pictures to fit cells 16 1

Code 2: Resize all images in the current sheet to fit cells

doc auto size pictures to fit cells 15 1


Batch insert and resize pictures to fit cells with a smart tool

 

Instead of manually importing and resizing pictures to fit Excel cells one by one, Kutools for Excel's Import Pictures feature allows for batch picture import. It not only positions images within cells but also ensures they're resized precisely to fit the cell's dimensions, making the entire process faster and more efficient.

After installing Kutools for Excel, please click Kutools Plus > Import & Export > Import Pictures, then specify following settings:

  1. Choose the picture format you want to import.
  2. Click Add to import pictures, the selected pictures will list in the Picture section.
  3. Choose Matching cell size.
  4. Choose the importing order option in the Import order drop-down list.
  5. Click Import.
  6. Choose a single cell to place the first picture, click OK.

Result:

Notes:

Automatically adjust size with cell changes

 

Once your images are resized to fit cells, they initially adapt to the current cell size. But what if your cells change size? The Move and Size with Cells option has you covered.

Important things: If an image is slightly smaller than its cell, it'll resize down as the cell shrink but won't expand if the cell does.
Step 1: Hold Ctrl key and select the images that you want to automatically adjust size

Tip: Click on Home > Find & Select > Select Pane, then choose a range containing the images to select them all at once.
Step 2: Right click any selected image and choose Format Object command

Step 3: Check Move and size with cells option

In the Format Picture pane, click Size & Properties icon, then check Move and size with cells option in the Properties section.

Result:

Now when you resize the cells, the images will be resized at the same time.

resize


Above are the four effective methods to automatically adjust picture sizes to fit cells in Excel. I hope you find this guide beneficial. For more invaluable Excel tips and tricks that can transform your data processing, dive in here.


The Best Office Productivity Tools

Kutools for Excel - Helps You To Stand Out From Crowd

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates  |  Delete Blank Rows  |  Combine Columns or Cells without Losing Data  |  Round without Formula ...
Super VLookup: Multiple Criteria  |  Multiple Value  |  Across Multi-Sheets  |  Fuzzy Lookup...
Adv. Drop-down List: Easy Drop Down List  |  Dependent Drop Down List  |  Multi-select Drop Down List...
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  Compare Columns to Select Same & Different Cells ...
Featured Features: Grid Focus  |  Design View  |  Big Formula Bar  |  Workbook & Sheet Manager | Resource Library (Auto Text)  |  Date Picker  |  Combine Worksheets  |  Encrypt/Decrypt Cells  |  Send Emails by List  |  Super Filter  |  Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters ...)  |  50+ Chart Types (Gantt Chart ...)  |  40+ Practical Formulas (Calculate age based on birthday ...)  |  19 Insertion Tools (Insert QR Code, Insert Picture from Path ...)  |  12 Conversion Tools (Numbers to Words, Currency Conversion ...)  |  7 Merge & Split Tools (Advanced Combine Rows, Split Excel Cells ...)  |  ... and more

Kutools for Excel Boasts Over 300 Features, Ensuring That What You Need is Just A Click Away...

Description


Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)

  • One second to switch between dozens of open documents!
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Edge and Firefox.
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations