Professional Documents
Culture Documents
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)
Insert multiple pictures and auto-adjust them with Kutools for Excel
Insert multiple pictures matching with their names with Kutools for Excel
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)
(/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.
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).
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:
Related articles:
Bring handy tabs to Excel and other Office software, just like Chrome, Firefox and new Internet Explorer.
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)
Sort by Best b
Say something here...
[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
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
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
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
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
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
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
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)