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?

Office Tab Enable Tabbed Editing and Browsing in Office, and Make Your Work Much Easier...
Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%
  • Reuse Anything: Add the most used or complex formulas, charts and anything else to your favorites, and quickly reuse them in the future.
  • More than 20 text features: Extract Number from Text String; Extract or Remove Part of Texts; Convert Numbers and Currencies to English Words.
  • Merge Tools: Multiple Workbooks and Sheets into One; Merge Multiple Cells/Rows/Columns Without Losing Data; Merge Duplicate Rows and Sum.
  • Split Tools: Split Data into Multiple Sheets Based on Value; One Workbook to Multiple Excel, PDF or CSV Files; One Column to Multiple Columns.
  • Paste Skipping Hidden/Filtered Rows; Count And Sum by Background Color; Send Personalized Emails to Multiple Recipients in Bulk.
  • Super Filter: Create advanced filter schemes and apply to any sheets; Sort by week, day, frequency and more; Filter by bold, formulas, comment...
  • More than 300 powerful features; Works with Office 2007-2019 and 365; Supports all languages; Easy deploying in your enterprise or organization.

 Batch insert multiple pictures matching with cell contents in Excel

The Match Import Pictures feature of Kutools for Excel, is a fantastic tool that can batch import and insert multiple pictures based on cell contents, and resize imported pictures same as cell size or to the specified size easily. Full Feature Free Trial 30-day!
ad match imported pics 01

Kutools for Excel - Includes more than 300 handy tools for Excel. Full feature free trial 30-day, no credit card required! Get It Now


 Insert multiple pictures and resize them in bulk by Insert Picture feature

We can insert multiple pictures in bulk by the (Insert) Picture feature in Excel, and then resize them simultaneously. Please do as follows:

1. In the worksheet, click Insert > Picture.

2. In the Insert Picture dialog, please open the folder containing pictures you will insert, select multiple pictures as you need, and click the Insert button. See screenshot:
Note: Holding Ctrl key, you can select multiple nonadjacent pictures with clicking them one by one; holding Shift key, you can select multiple adjacent pictures with clicking the first picture and the last one.

Now pictures are inserted in bulk and stacking in the worksheet.

3. Keep these pictures selected, and resize them in bulk by entering new number into both Width and Height boxes in the Size group on the Format tab. See screenshot:

Now all inserted pictures are changed to the same size simultaneously at once.

4. At present you need to manually move each picture separately to a fit place.

Note: If there are dozens of pictures stacking, it will be quite time-consuming to manually move them to fit places.


 Insert multiple pictures and resize them in bulk with OneNote

To avoid moving stacking pictures one by one, this method introduce another trick to insert multiple pictures with the help of OneNote. Please do as follows:

1. Launch OneNote, and create a new page. And then click Insert > Picture.

2. In the Insert Picture dialog, please open the folder containing pictures you will insert, select multiple pictures as you need, and click the Insert button. See screenshot:
Note: Holding Ctrl key, you can select multiple nonadjacent pictures with clicking them one by one; holding Shift key, you can select multiple adjacent pictures with clicking the first picture and the last one.

doc insert multiple pictures OneNote 032

3. Press Ctrl + A keys to select all inserted pictures in the OneNote, and then press Ctrl + C keys to copy them.

4. Go the worksheet in Excel, and press Ctrl + V keys to paste the pictures in the worksheet. Now all pictures are pasted vertically as left screenshot shown.

5. Select any one of the pictures, and press Ctrl + A keys to select all of them. Then resize the pictures in bulk by entering new numbers into both Width and Height boxes in the Size group on the Format tab. See screenshot:

Now all specified pictures are inserted in Excel and resized to the same size in bulk.


 Insert 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 the first cell of destination 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.

5. In the Open dialog, please open the folder which contains the pictures that you want to insert, select multiple pictures you will insert, and click the Open button. 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 - Includes more than 300 handy tools for Excel. Full feature free trial 30-day, no credit card required! Get It Now

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

2. In the Import Pictures dialog box, please do as follows:
(1) Specify the display order of pictures from the Import order drop down list, 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) Click the Import size button;

3. Now 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. In the new Import Pictures dialog box, please choose the first cell of destination range you will insert pictures, and click the OK button.

At present, all your selected pictures have been inserted into your cells from the active cell vertically or horizontally. See right screenshot:

The Import Pictures feature of Kutools for Excel is designed to insert a batch of pictures simultaneously with matching cell size, specified size, or pictures' own sizes in Excel. Have a Free Trial!


 Insert multiple pictures matching with their names with Kutools for Excel

Kutools for Excel also supports an dramatical Match Import Pictures feature to match pictures and cell contents and insert matched pictures only in bulk in Excel.

Kutools for Excel - Includes more than 300 handy tools for Excel. Full feature free trial 30-day, no credit card required! Get It Now

1. Select your picture name cells that you want to insert their matching pictures, and click Kutools Plus > Import / Export > Match Import Pictures. see screenshot:

2. In the popped out Match Import Pictures dialog box, please do as follows:
(1) Specify the display order of pictures from the Import order drop down list;
(2) Click Add button to add the pictures to the picture list box. For your information, only matched pictures will be listed out.
(3) Then click Import Size button.

3. Now in the Import Picture Size dialog, you can choose the picture size matching your need, and click the Ok button. See screenshot:

4. Now you return to the Import Pictures dialog, click Import button to import the images.

5. In the popping out Match Import Pictures dialog, please specify the first cell of destination range you will insert pictures, and click the OK button. See screenshot:

So far, all the pictures are inserted into the cells based on their relative names. See right screenshot:

The Match Import Pictures feature of Kutools for Excel can help Excel users quickly filter pictures based on cell values and then insert these pictures in bulk. In addition, these matched pictures can be resized to the specified size or cell size automatically. Have a Free Trial!


Related articles


Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial.
kte tab 201905

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!
officetab bottom
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.
    jlkiv80 · 5 months ago
    I am using the following code, which came from Funzone, to add my photos but i need to be able to skip a column, leaving a blank column between photos, can someone help?

    Sub InsertPictures()
    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
    xRowIndex = Application.ActiveCell.Row

    If IsArray(PicList) Then

    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)
    xColIndex = xColIndex + 1
    If xColIndex = 4 Then GoTo Continue1 Else GoTo Continue2

    Continue1:
    xRowIndex = xRowIndex + 2
    xColIndex = xColIndex - 3

    Continue2:
    Next
    End If
    End Sub
  • To post as a guest, your comment is unpublished.
    jlkiv80 · 5 months ago
    I am using the following code to add my photos but i need to be able to skip a column, leaving a blank column between photos, can someone help?

    Sub InsertPictures()
    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
    xRowIndex = Application.ActiveCell.Row

    If IsArray(PicList) Then

    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)
    xColIndex = xColIndex + 1
    If xColIndex = 4 Then GoTo Continue1 Else GoTo Continue2

    Continue1:
    xRowIndex = xRowIndex + 2
    xColIndex = xColIndex - 3

    Continue2:
    Next
    End If
    End Sub
  • To post as a guest, your comment is unpublished.
    Funzone · 9 months ago
    I was finally able to figure it out on my own.

    The code below will insert 3 pictures horizontally in the columns then move down a row and insert 3 more horizontally it will repeat this process until it runs out of the selected pictures.



    Sub InsertPictures()
    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
    xRowIndex = Application.ActiveCell.Row

    If IsArray(PicList) Then

    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)
    xColIndex = xColIndex + 1
    If xColIndex = 4 Then GoTo Continue1 Else GoTo Continue2

    Continue1:
    xRowIndex = xRowIndex + 1
    xColIndex = xColIndex - 3

    Continue2:
    Next
    End If
    End Sub
  • To post as a guest, your comment is unpublished.
    Funzone · 10 months 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 · 10 months 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 · 10 months 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 · 10 months 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 · 10 months ago
    you are a legend
  • To post as a guest, your comment is unpublished.
    Marco Itaborahy · 1 years ago
    Muito Obrigado, foi muito útil.
  • To post as a guest, your comment is unpublished.
    Nael · 1 years ago
    Quality of pictures is reduced when using the Code while its quality was good when adding it without the macro
  • To post as a guest, your comment is unpublished.
    Wong Vincent · 1 years ago
    How about adding the fit picture but maintain aspect ratio
    having trouble merging the following code:


    Public Sub FitPic()
    On Error GoTo NOT_SHAPE
    Dim PicWtoHRatio As Single
    Dim CellWtoHRatio As Single
    With Selection
    PicWtoHRatio = .Width / .Height
    End With
    With Selection.TopLeftCell
    CellWtoHRatio = .Width / .RowHeight
    End With
    Select Case PicWtoHRatio / CellWtoHRatio
    Case Is > 1
    With Selection
    .Width = .TopLeftCell.Width
    .Height = .Width / PicWtoHRatio
    End With
    Case Else
    With Selection
    .Height = .TopLeftCell.RowHeight
    .Width = .Height * PicWtoHRatio
    End With
    End Select
    With Selection
    .Top = .TopLeftCell.Top
    .Left = .TopLeftCell.Left
    End With
    Exit Sub
    NOT_SHAPE:
    MsgBox "Select a picture before running this macro."
    End Sub
  • To post as a guest, your comment is unpublished.
    SHAHBAZ · 1 years ago
    How can I modify the following code so that pictures are INSERT A1,B1,C1,D1
    PLEASE HELP
    • To post as a guest, your comment is unpublished.
      yam · 1 years ago
      Try this.
      ...

      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 )
      xColIndex = xColIndex
      Next

      ...
  • To post as a guest, your comment is unpublished.
    Javi · 1 years ago
    Amazing! Thank you!!
  • To post as a guest, your comment is unpublished.
    Mark · 2 years ago
    With the VBA how would I pull in an "image" that has multiple pages. In my example I am working with TIF files.
  • To post as a guest, your comment is unpublished.
    aloko · 2 years 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
  • To post as a guest, your comment is unpublished.
    Jason · 2 years 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)
    xColIndex = Application.ActiveCell.Column
    If IsArray(PicList ) Then
    xRowIndex = Application.Act iveCell.Row
    For lLoop = LBound(PicList) To UBound(PicList)
    Set Rng = Cells(xRowIndex , xColIndex)
    Set sShape = ActiveSheet.Sha pes.AddPicture( PicList(lLoop), msoFalse, msoCTrue, Rng.Left, Rng.Top, Rng.Width, Rng.Height)
    xRowIndex = xRowIndex + 1
    Next
    End If
    End Sub
    • To post as a guest, your comment is unpublished.
      Lucas Ricardo · 6 months ago
      Alguem conseguiu o codigo para a pergunta dele? estou precisando também!
  • To post as a guest, your comment is unpublished.
    Mitch · 2 years 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?
  • To post as a guest, your comment is unpublished.
    Divya · 2 years 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
  • To post as a guest, your comment is unpublished.
    Rich · 2 years ago
    Hey all,

    This is great! I have been following your tutorials for some time now.

    What I was hoping you could help me with is, how do I change this from sticking the images down a column to across a row?

    And how can I add the "Full File Name (i.e. example_image.jpg)" to the Row above it.

    Row 'A' : "Filename.jpg"
    Row 'B' : "Image Thumbnail"

    Thanks!!
  • To post as a guest, your comment is unpublished.
    Puru · 2 years ago
    Using below VBA program cant insert the picture in merged cell,

    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)
    xColIndex = Application.ActiveCell.Column
    If IsArray(PicList ) Then
    xRowIndex = Application.Act iveCell.Row
    For lLoop = LBound(PicList) To UBound(PicList)
    Set Rng = Cells(xRowIndex , xColIndex)
    Set sShape = ActiveSheet.Sha pes.AddPicture( PicList(lLoop), msoFalse, msoCTrue, Rng.Left, Rng.Top, Rng.Width, Rng.Height)
    xRowIndex = xRowIndex + 1
    Next
    End If
    End Sub

    Please advice me to modify the VBA.
  • To post as a guest, your comment is unpublished.
    Saintimnot · 3 years ago
    Hi, I tried the code on my spreadsheet and it worked perfect. Till I try to do filter. Find that the last picture will always be shown on filter result. anyone able to help?
  • To post as a guest, your comment is unpublished.
    Muhammad Ali · 3 years ago
    it is very help ful me.
    It's so nice work.......
    Thanks
  • To post as a guest, your comment is unpublished.
    Gilberto · 3 years ago
    Hello!
    Any reason why "Sub InsertPictures()" would not work in Excel 2003?
    I have already added the reference to Microsoft.Scripting.Runtime

    Thanks in advance

    Gilberto
  • To post as a guest, your comment is unpublished.
    Karlo · 3 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
  • To post as a guest, your comment is unpublished.
    AJu · 3 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
  • To post as a guest, your comment is unpublished.
    Armin · 3 years ago
    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 !
  • To post as a guest, your comment is unpublished.
    edward · 4 years ago
    Hi EXcel Masters,

    I have 2 excel sheets. One with more than hundred Pictures and description of the picture in the next cell to it.

    The other sheet after selection probably left with 40 description of it. How can i transfer the pictures to this sheet as per my selection.

    Thanks al
  • To post as a guest, your comment is unpublished.
    Hadrian · 4 years ago
    Thanks a lot, it works
  • To post as a guest, your comment is unpublished.
    Eklezys · 4 years ago
    Is it possible to modify that vba code to insert 4 pictures in a grid-like patern like this: pic1 in A1, pic2 in A2, pic3 in B1 and pic4 in B2?
    Tanks!
    • To post as a guest, your comment is unpublished.
      Ali · 4 years ago
      select the cells and resize them by width and height as per ur needs..
      if you have ten pics select ten cells or more the select more..!!

      then press Alt+F11
      then click INSERT
      THEN click MODULE
      THEN PASTE THE FOLLOWING CODE AS IT IS..
      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

      AFTER THE ABOVE CODE PRESS F5 ..
      THEN SELECT THE FILES FROM THE COMPUTER WHERE EVER THEY ARE. UPTO UR NEED.
      THEN IF U NOT SAVED THE WORKBOOK THEN IT WILL ASK TO SAVE IT. IF U ALREADY SAVED IT . THEN UR JOB IS HOPE THIS HELPS..
      Ali..!!
    • To post as a guest, your comment is unpublished.
      Ali · 4 years ago
      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
      • To post as a guest, your comment is unpublished.
        Puru · 2 years ago
        Could you please help me to modify the code to insert the merged column and row.

        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)
        xColIndex = Application.ActiveCell.Column
        If IsArray(PicList ) Then
        xRowIndex = Application.Act iveCell.Row
        For lLoop = LBound(PicList) To UBound(PicList)
        Set Rng = Cells(xRowIndex , xColIndex)
        Set sShape = ActiveSheet.Sha pes.AddPicture( PicList(lLoop), msoFalse, msoCTrue, Rng.Left, Rng.Top, Rng.Width, Rng.Height)
        xRowIndex = xRowIndex + 1
        Next
        End If
        End Sub
    • To post as a guest, your comment is unpublished.
      Eklezys · 4 years ago
      nevermind i found how to do It :)
  • To post as a guest, your comment is unpublished.
    TomW · 4 years ago
    Is there a version of Kuttools for Mac?
  • To post as a guest, your comment is unpublished.
    Ram · 5 years ago
    Great Post!
    But i got other ways of doing same thing.....
    ================================================
    Sub ipic()

    Dim i As Integer
    For i = 2 To 10

    Cells(i, 1).Select
    Dim picname As String
    picname = Cells(i, 2)

    ActiveSheet.Pictures.Insert("F:\Ram-PC\Macro\MyImage\" & picname & ".jpg").Select

    With Selection
    .Left = ActiveCell.Left
    .Top = ActiveCell.Top
    .ShapeRange.LockAspectRatio = msoFalse
    .ShapeRange.Height = 34#
    .ShapeRange.Width = 80#
    End With

    Next
    Range("a1").Select

    End Sub
  • To post as a guest, your comment is unpublished.
    kapil · 5 years ago
    good support for Excel.....you gyus are really helping in saving time.
    thanks
  • To post as a guest, your comment is unpublished.
    Kirtan Patel · 5 years ago
    In the first topic "Insert multiple pictures into Excel with VBA code", how do insert one picture in two cells. for example, first picture will be inserted into cell A1 and A2, second picture will be inserted into cell A3 and A4 and so on.
  • To post as a guest, your comment is unpublished.
    Lawrence · 5 years ago
    Hi,

    I am able to use the InsertPictures module and works properly as far as jpg. It doesn't want to work for PNG though.

    Can you please advise?

    Regards,
    Lawrence
  • To post as a guest, your comment is unpublished.
    Rahul Gupta · 5 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 !