Skip to main content

Batch Auto-resize pictures to fit cells in Excel – 2 useful ways

Author: Xiaoyang Last Modified: 2025-04-08

When working with images in Excel, aligning them with cells is crucial for a structured and organized presentation. If you frequently insert pictures into Excel and want them to automatically resize to fit cell dimensions. This guide will walk you through the best methods to resize pictures to fit cells efficiently.

Batch Auto-resize pictures to fit cells with VBA code

Batch Auto-resize pictures to fit cells with Kutools for Excel


Resize a selected picture to fit a single cell with VBA code

For users who need to insert multiple images and automatically resize them to fit within specific cells, a VBA macro provides a highly efficient solution. By leveraging VBA, you can streamline the process of importing and adjusting images, ensuring they align perfectly with cell boundaries. This method is particularly useful when handling bulk image imports, as it eliminates the need for manual resizing and positioning.

1. Adjust the cell size that you want to put the picture, and select the cells.

2. Then, hold down the ALT + F11 keys to open the "Microsoft Visual Basic for Applications" window.

3. Click "Insert" > "Module", and paste the following macro in the Module window.

VBA: Insert multiple pictures based on the cell size

Sub InsertPictures()
'Updateby Extendoffice
Dim PicList() As Variant
Dim PicFormat As String
Dim Rng As Range
Dim sShape As Shape
On Error Resume Next
PicList = Application.GetOpenFilename(PicFormat, MultiSelect:=True)
xColIndex = Application.ActiveCell.Column
If IsArray(PicList) Then
    xRowIndex = Application.ActiveCell.Row
    For lLoop = LBound(PicList) To UBound(PicList)
        Set Rng = Cells(xRowIndex, xColIndex)
        Set sShape = ActiveSheet.Shapes.AddPicture(PicList(lLoop), msoFalse, msoCTrue, Rng.Left, Rng.Top, Rng.Width, Rng.Height)
        xRowIndex = xRowIndex + 1
    Next
End If
End Sub

4. Then press the F5 key to run this code. In the Open window, please choose the folder which contains the pictures, then select the images that you want to insert.
vba code to select the images

5. And then click "Open" button, and all the selected pictures have been inserted into your selection based on the cell size. See screenshot:
vba code to insert the images to fit cells


Batch Auto-resize pictures to fit cells with Kutools for Excel

If you're not familiar with VBA code, don't worry! Kutools for Excel offers a simple and efficient way to batch auto-resize pictures to fit their corresponding cells. This feature is especially useful for users who frequently insert images, such as product lists, reports, or visual data presentations.

In this section, we will walk you through the steps to automatically resize multiple images to fit their respective cells using Kutools for Excel, saving you time and ensuring a neat and organized worksheet.

Kutools for Excel offers over 300 advanced features to streamline complex tasks, boosting creativity and efficiency. Itegarate with AI capabilities, Kutools automates tasks with precision, making data management effortless. Detailed information of Kutools for Excel...         Free trial...

After installing Kutools for Excel, please do with the following steps:

  1. Click the "Kutools Plus" > "Import/Export" > "Import Pictures".
    Click the Kutools Plus >Import/Export > Import Pictures
  2. In the "Import Pictures" dialog box, configure the following options:
    • Click "Add" button to select the image files or folder to add the pictures into the Picture list;
    • In the "Import size" drop down, select "Matching cell size";
    • Specify the picture order from the "Import order" drop down list, you can choose "Fill vertically cell after cell" or "Fill Horizontally cell after cell";
    • Finally, click "Import" button.
      specify the options in the dialog box
  3. Now, another "Import Pictures" is popped out, specify the destination cells you will import picture into, see screenshot:
    select range to put the images
  4. Then, click OK button, all the selected images have been inserted to match the size of specific cells as below screenshot shown:
    insert the images by cell size by kutools

Conclusion

Both VB Macro and Kutools for Excel offer effective ways to resize pictures to fit cells, but they cater to different user needs and skill levels.

  • VBA code is ideal for users who need high customization and are comfortable with programming. It is a cost-effective solution but requires some technical expertise.
  • Kutools for Excel is perfect for users who prefer a user-friendly, no-code approach and are willing to invest in a third-party tool for additional features and ease of use.

Ultimately, the choice between the two methods depends on the user's specific requirements, technical skills, and budget. For those who frequently work with pictures in Excel, exploring both options and understanding their strengths and limitations can lead to more efficient and streamlined workflows. If you're interested in exploring more Excel tips and tricks, our website offers thousands of tutorials to help you master Excel.


Related Article:

How to resize multiple cells to fit pictures above them quickly in Excel?

Best Office Productivity Tools

🤖 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 Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create 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 Ranges & Columns ...
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 Cells, ...)   |   ... and more
Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!