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
- Select the cells then select Home > Format > Row Height, and in the popping dialog, type the height number you need. Click OK.
- Select Home > Format > Column Width, and in the popping dialog, type the width number you need. Click OK.
Step 2: Import a picture
- 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.
- Find the desired image, and click Insert.
Step 3: Repeat above 2 steps to insert images to related cells one by one
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.
Step 1: Select the image you intend to resize
Step 2: Use shortcut to resize
- Hover over the image's right-center circle until a double-arrow cursor appears.
- 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.
- Hover over the image's bottom-center circle until a double-arrow cursor appears.
- 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.
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
- Select Home > Find & Select > Selection Pane….
- 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
- Right click on any selected picture in the worksheet, choose Format Object from the context menu.
- Click Size & Properties tab in the pane, enter a height number or a width number into Height or Width textbox under Size section.
- 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
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 to run the code
Result:
Code 1: Resize selected images to fit cells
Code 2: Resize all images in the current sheet to fit cells
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:
- Choose the picture format you want to import.
- Click Add to import pictures, the selected pictures will list in the Picture section.
- Choose Matching cell size.
- Choose the importing order option in the Import order drop-down list.
- Click Import.
- Choose a single cell to place the first picture, click OK.
Result:
- Once Kutools for Excel is installed, the Import Pictures feature becomes available. Download Kutools for Excel now and try out this handy feature!
- If you want to batch import images based on cell values, Kutools for Excel’s Match Import Pictures will be a good helper.
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.
Step 1: Hold Ctrl key and select the images that you want to automatically adjust size
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.
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 for Excel Boasts Over 300 Features, Ensuring That What You Need is Just A Click Away...
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.
Table of contents
- Video: Auto size pictures to fit cells
- Insert pictures into cells
- Resize pictures to fit cells
- By shortcut (one by one)
- By Format Picture pane (batch resize height or width)
- By VBA code (batch resize, cannot undo)
- Batch insert and resize pictures to fit cells with a smart tool
- Automatically adjust size with cell changes
- Related Articles
- Best Office Productivity Tools
- Comments