Sei sulla pagina 1di 8

 ExtendOffice (https://www.extendoffice.

com)

 Office Tips & Tricks  Tips & Tricks for Excel  Tips & Tricks for Word  Tips & Tricks for Outlook
(/documents.html) (/documents/excel.html) (/documents/word.html) (/documents/outlook.html)

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

Recommended Productivity Tools

Office Tab: Bring handy tabs to Excel and other Office software, just like Chrome, Firefox and new Internet Explorer.
(/product/office-tab.html) Try now (/downloads/SetupOfficeTab.exe)

Kutools for Excel: 200 new features for Excel, make Excel much easy and powerful, increase productivity immediately.
(/product/kutools-for-excel.html) Try now (/downloads/KutoolsforExcelSetup.exe)

Insert Multiple Pictures Into Excel With VBA Code

(/product/office-tab.html)

Amazing! Using Tabs In Excel Like Firefox, Chrome, Internet Explore 10! (/Product/Office-Tab.Html)

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.

1 Sub InsertPictures()
2 'Update 20140513
3 Dim PicList() As Variant
4 Dim PicFormat As String
5 Dim Rng As Range
6 Dim sShape As Shape
7 On Error Resume Next
8 PicList = Application.GetOpenFilename(PicFormat, MultiSelect:=True)
9 xColIndex = Application.ActiveCell.Column
10 If IsArray(PicList) Then
11 xRowIndex = Application.ActiveCell.Row
12 For lLoop = LBound(PicList) To UBound(PicList)
13 Set Rng = Cells(xRowIndex, xColIndex)
14 Set sShape = ActiveSheet.Shapes.AddPicture(PicList(lLoop), msoFalse, msoCTrue, Rng.Left, Rng.Top, Rng.Width,
15 xRowIndex = xRowIndex + 1
16 Next
17 End If
18 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.

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

Insert 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 (/product/kutools-for-excel.html) includes more than 120 handy Excel tools. Free to try with no limitation in 30
days. Get it Now (/download/kutools-for-excel.html).

After installing Kutools for Excel, please do as follows:

1. Click Enterprise > Import / Export > Import Pictures, see screenshot:
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.

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:

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:

Insert 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:

3. Then click Match button to select the cells with the picture names that you want to match with their pictures.
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:

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:

Click Import Pictures (/product/kutools-for-excel/excel-insert-multiple-pictures.html) to know more about this feature.

Related articles:

How to resize pictures to fit cells in Excel? (/documents/excel/1060-excel-resize-picture-to-fit-cell.html)


How to resize multiple cells to fit pictures above them quickly in Excel? (/documents/excel/1059-excel-resize-cell-to-fit-picture.html)

Recommended Productivity Tools

Office Tab (/Product/Office-Tab.Html)

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

Kutools For Excel (/Product/Kutools-For-Excel.Html)

Amazing! Increase your productivity in 5 minutes. Don't need any special skills, save two hours every day!
200 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...

(/product/kutools-for-excel.html)

(/product/kutools-for-excel.html) (/download/kutools-for-
excel.html) (/order/kutools-for-excel.html)

22 Comments RSS (/component/jlexcomment/?view=items&com_name=content&com_key=1156&format=feed) Login

Sort by Best b
Say something here...

Karlo · 1 years ago

[quote name="Armin"]or you use directly image-xls . with this Excel addin you're able to insert unlimited number of Pictures into Excel cell, or
as a comment. it also resizes your Pictures. and it's possible to order and filter your Excel sheet, including the Pictures ![/quote]
[quote name="Rahul Gupta"]The instructions with the heading : Insert multiple pictures into Excel with VBA code is simply awesome quick and
effective !!! this is a good alternative to buy and install plugins.
This is my first comment online !!
kudos ![/quote]

i tried this and seems to work fine - but you can't order or filter the Excel list including the pics. also the pics are not scaled proportional . so i
bought image-xls - cost a bit , but does all i need
Reply Share

AJu · 1 years ago

I am Mac user and once i copied the code into the new module and run it nothing happens. Is there something i have to do in mac in order to
run the VBA code?
Thanks
Reply Share

Hadrian · 1 years ago

Thanks a lot, it works


Reply Share

TomW · 2 years ago

Is there a version of Kuttools for Mac?


Reply Share

Rahul Gupta · 3 years ago

The instructions with the heading : Insert multiple pictures into Excel with VBA code is simply awesome quick and effective !!! this is a good
alternative to buy and install plugins.
This is my first comment online !!
kudos !
Reply Share

Mark · 2 months ago

With the VBA how would I pull in an "image" that has multiple pages. In my example I am working with TIF files.
Reply Share

aloko · 2 months ago

Hi
good work
but i face one problem
this VBE code just work for normal cells
can you modify it for merged cells
you help is appreciated
Reply Share

Jason · 3 months ago

How can I modify the following code so that pictures are populated in a selected range of cells across multiple columns and rows rather than in
consecutive cells in successive rows in the same column?

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.Get OpenFilename(Pi cFormat, MultiSelect:=True)
Read more

Reply Share

Mitch · 3 months ago

This code ALMOST works for my needs. I have 200 images, each image needs to go on it's own sheet. How do I go about that?
Reply Share

Divya · 5 months ago

Hey,

Ive inserted the pictures using my own VBE code. And now I've tried to share it with the others, unfortunately they are not able to see the
pictures..... I would be grateful if anyone could tell me what am I missing.

Thanks
Reply Share
1 (https://www.extendoffice.com/documents/excel/1156-excel-insert-multiple-pictures.html?page_comment=1)

2 (https://www.extendoffice.com/documents/excel/1156-excel-insert-multiple-pictures.html?page_comment=2)

3 (https://www.extendoffice.com/documents/excel/1156-excel-insert-multiple-pictures.html?page_comment=3)

Copyright © 2009 - 2017 ExtendOffice.com | All Rights Reserved. Sitemap (/component/jmap/sitemap.html)


Microsoft and the Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other
countries.