Cookies help us deliver our services. By using our services, you agree to our use of cookies.
Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to insert multiple pictures and resize them at once in Excel?

It is easy for us to insert one picture into Excel, but if you need to insert multiple pictures at once so that can save much time, how could you do?

Insert multiple pictures into Excel with VBA code

Insert multiple pictures and auto-adjust them with Kutools for Excel

Insert multiple pictures matching with their names with Kutools for Excel


arrow blue right bubbleInsert multiple pictures into Excel with VBA code


With the following VBA code, you can insert multiple pictures into Excel file cell by cell.

1. Select a range that you want to insert pictures.

2. Hold down the ALT + F11 keys, and it opens the Microsoft Visual Basic for Applications window.

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

Sub InsertPictures()
'Update 20140513
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, and select the folder which contains the pictures that you want to insert. Then specify the pictures as you need. And click Open button.

doc-insert-multiple-pictures1-1

5. And all the selected pictures have been imported into your selection based on the cell size. See screenshot:

doc-insert-multiple-pictures2-2


arrow blue right bubbleInsert multiple pictures and auto-adjust them with Kutools for Excel

Kutools for Excel’s Import Pictures utility can help you quickly insert multiple pictures into Excel based on the cell size or picture size. You can specify the pictures’ height and width as you need as well.

Kutools for Excel includes more than 300 handy Excel tools. Free to try with no limitation in 30 days. Get it Now.

After installing Kutools for Excel, please do as follows:

1. Click Enterprise > Import / Export > Import Pictures, see screenshot:

doc-insert-multiple-pictures3-3

2. In the Import Pictures dialog box, please do the following operations:

  • (1.) Click the drop down list under Import Pictures section to choose the display order of your pictures. You can choose Fill vertically cell after cell or Fill Horizontally cell after cell.
  • (2.) Click Add button to select the image files or folder to add the pictures into the Picture list. And all your selected pictures will be listed in the list box.

doc-insert-multiple-pictures4-4

3. Then you can specify the size of the pictures by clicking Size button, and in the Import Picture Size dialog, you can choose the picture size matching your need. See screenshot:
doc-insert-multiple-pictures5-5

4. After specifying the picture size, please click OK to close this dialog, and back to the Import Pictures dialog, click Import button to import the images.

5. And all your selected pictures have been inserted into your cells from the active cell vertically or horizontally. See screenshot:
doc-insert-multiple-pictures6-6


arrow blue right bubbleInsert multiple pictures matching with their names with Kutools for Excel

1. Select your picture name cells that you want to insert their matching pictures.

2. Click Enterprise > Import / Export > Import Pictures , and in the popped out dialog box, click Add button to add the pictures to the picture list box, see screenshot:

doc-insert-multiple-pictures7-7

3. Then click Match button to select the cells with the picture names that you want to match with their pictures.

doc-insert-multiple-pictures8-8

4. And then all the image names will be matched with the pictures automatically, click OK to return to the former dialog, then you can specify the size of the pictures, click Size button, in the Import Picture Size dialog box, set the picture size as you need. See screenshot:

doc-insert-multiple-pictures8-8

5. Click OK to close this dialog, and then click Import button and all the pictures are inserted into the cells based on their relative names. See screenshots:

doc-insert-multiple-pictures10-10 -2 doc-insert-multiple-pictures11-11

Click Import Pictures to know more about this feature.


Related articles:

How to resize pictures to fit cells in Excel?

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



Recommended Productivity Tools

Office Tab

gold star1 Bring handy tabs to Excel and other Office software, just like Chrome, Firefox and new Internet Explorer.

Kutools for Excel

gold star1 Amazing! Increase your productivity in 5 minutes. Don't need any special skills, save two hours every day!

gold star1 300 New Features for Excel, Make Excel Much Easy and Powerful:

  • Merge Cell/Rows/Columns without Losing Data.
  • Combine and Consolidate Multiple Sheets and Workbooks.
  • Compare Ranges, Copy Multiple Ranges, Convert Text to Date, Unit and Currency Conversion.
  • Count by Colors, Paging Subtotals, Advanced Sort and Super Filter,
  • More Select/Insert/Delete/Text/Format/Link/Comment/Workbooks/Worksheets Tools...

Screen shot of Kutools for Excel

Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Funzone · 5 days ago
    I would really like to use this VBA code to fill an array of cells with picture like 5 across then move to next row and 5 across until you run out of selected pictures but I just can't wrap my head around how to do it. Is this at all possible?


    If you know how to do this please post the code. Thank you In advance!

    Similar to https://www.extendoffice.com/documents/excel/3360-excel-transpose-every-5-rows.html
    except by selecting pictures and pasting the output in an array.
  • To post as a guest, your comment is unpublished.
    Funzone13 · 5 days ago
    I would really like to use this VBA code to fill an array of cells with picture like 5 across then move to next row and 5 across until you run out of selected pictures but I just can't wrap my head around how to do it. Is this at all possible?

    Similar to https://www.extendoffice.com/documents/excel/3360-excel-transpose-every-5-rows.html
    except by selecting pictures and pasting the output in an array
  • To post as a guest, your comment is unpublished.
    David · 8 days ago
    les agradezco mucho realmente ayudan muchisimo con el trabajo y el tiempo. Me sirvio perfecto para un inventario con fotos.
    reitero mi agradecimiento
  • To post as a guest, your comment is unpublished.
    Ed Go · 16 days ago
    Tried this code and in all honesty is amazing and fast, however is there any chance of amending this to make it resize the pictures to a custom size.
    I cannot seem to get my head around it.
    Thanks
  • To post as a guest, your comment is unpublished.
    Drew Reyes · 29 days ago
    you are a legend