跳到主要内容

如何在Excel中一次插入多张图片并调整其大小?

我们很容易在Excel中插入一张图片,但是如果您需要一次插入多张图片以节省大量时间,该怎么办?


插入多张图片,并通过“插入图片”功能批量调整它们的大小

我们可以通过Excel中的(插入)图片功能批量插入多张图片,然后同时调整它们的大小。 请执行以下操作:

1。 在工作表中,单击 插页 > 图片.

2。 在“插入图片”对话框中,请打开包含要插入图片的文件夹,根据需要选择多张图片,然后单击 插页 按钮。 看截图:
备注:控股 按Ctrl 键,您可以一幅一幅地单击以选择多张不相邻的图片; 保持 转移 键,单击第一张和最后一张可以选择多张相邻的图片。

现在,图片将批量插入并堆叠在工作表中。

3。 保持选中这些图片,并通过在两个图片中输入新数字来批量调整它们的大小。 宽度高度 中的框 尺寸 组上 格式 标签。 看截图:

现在,所有插入的图片会立即同时更改为相同大小。

4。 目前,您需要手动将每张图片分别移动到合适的位置。

备注:如果有数十张照片堆叠在一起,则手动将它们移动到合适的位置将非常耗时。

在Excel中批量插入与单元格内容匹配的多张图片

匹配导入图片 Kutools for Excel的功能是一个很棒的工具,可以根据单元格内容批量导入和插入多张图片,并轻松将导入的图片调整为与单元格大小相同或指定大小。


广告匹配导入图片01

Kutools for Excel - 使用 300 多种基本工具增强 Excel 功能。 享受全功能 30 天免费试用,无需信用卡! 立即行动吧!

插入多张图片并使用OneNote批量调整它们的大小

为避免一张一张地移动堆叠的图片,此方法引入了另一个技巧,即借助OneNote插入多张图片。 请执行以下操作:

1。 启动OneNote,然后创建一个新页面。 然后点击 插页 > 图片.

2。 在“插入图片”对话框中,请打开包含要插入图片的文件夹,根据需要选择多张图片,然后单击 插页 按钮。 看截图:
备注:控股 按Ctrl 键,您可以一幅一幅地单击以选择多张不相邻的图片; 保持 转移 键,单击第一张和最后一张可以选择多张相邻的图片。

doc插入多张图片OneNote 032

3。 按 按Ctrl + A 键以选择OneNote中所有插入的图片,然后按 按Ctrl + C 复制它们的键。

4。 在Excel中转​​到工作表,然后按 按Ctrl + V 键将图片粘贴到工作表中。 现在,所有图片都被垂直粘贴,如左图所示。

5. 选择任何一张图片,然后按 按Ctrl + A 键选择所有这些。 然后通过在两者中输入新数字来批量调整图片大小 宽度高度 中的框 尺寸 组上 格式 标签。 看截图:

现在,所有指定的图片都将插入到Excel中,并批量调整为相同大小。


使用VBA代码将多张图片插入Excel

使用以下VBA代码,您可以将多个图片逐个单元插入Excel文件中。

1。 选择要插入图片的目的地范围的第一个单元格。

2。 按住 ALT + F11 键,然后打开 Microsoft Visual Basic应用程序 窗口。

3。 点击 插页 > 模块,然后将以下宏粘贴到 模块窗口.

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。 然后按 F5 运行此代码的关键。

5。 在“打开”对话框中,请打开包含要插入图片的文件夹,选择要插入的多张图片,然后单击 可选 按钮。 并且所有选择的图片均已根据单元格大小导入到您的选择中。 看截图:


插入多张图片并使用 Kutools for Excel 自动调整它们

Kutools for Excel导入图片 实用程序可以帮助您根据单元格大小或图片大小将多张图片快速插入Excel。 您也可以根据需要指定图片的高度和宽度。

Kutools for Excel - 使用 300 多种基本工具增强 Excel 功能。 享受全功能 30 天免费试用,无需信用卡! 立即行动吧!

1。 点击 Kutools 加 > 导入/导出 > 导入图片,请参见屏幕截图:

2。 在 导入图片 对话框,请执行以下操作:
(1)从 进口订单 下拉列表,您可以选择 垂直填充单元格 or 逐个单元格水平填充.
(2)点击 地址 按钮选择图像文件或文件夹以将图片添加到“图片”列表中。 并且所有选择的图片将在列表框中列出。
(3)点击 进口尺寸 按钮;

3。 现在在 导入图片尺寸 在对话框中,您可以选择符合您需要的图片尺寸。 看截图:

4。 指定图片尺寸后,请点击 OK 关闭此对话框,然后返回 导入图片 对话框中,单击 进口 按钮导入图像。

5。 在新的“导入图片”对话框中,请选择要插入图片的目标范围的第一个单元格,然后单击 OK 按钮。

目前,所有选择的图片已从活动单元垂直或水平插入到单元中。 看右边的截图:

导入图片 Kutools for Excel 的功能旨在同时插入一批具有匹配单元格大小、指定大小或 Excel 中图片自身大小的图片。 免费试用!


使用 Kutools for Excel 插入与其名称匹配的多张图片

Kutools for Excel 还支持戏剧性的 匹配导入图片 功能以匹配图片和单元格内容,并仅在Excel中批量插入匹配的图片。

Kutools for Excel - 使用 300 多种基本工具增强 Excel 功能。 享受全功能 30 天免费试用,无需信用卡! 立即行动吧!

1。 选择要插入其匹配图片的图片名称单元格,然后单击 Kutools 加 > 导入/导出 > 匹配导入图片。 看截图:

2。 在弹出的“匹配导入图片”对话框中,请执行以下操作:
(1)从 进口订单 下拉列表;
(2)点击 地址 按钮将图片添加到图片列表框中。 供您参考,仅列出匹配的图片。
(3)然后点击 进口尺寸 按钮。

3. 现在在 导入图片尺寸 对话框中,您可以选择符合您需要的图片尺寸,然后点击 Ok 按钮。 看截图:

4。 现在您回到 导入图片 对话框中,单击 进口 按钮导入图像。

5.在弹出的“匹配导入图片”对话框中,指定要插入图片的目标范围的第一个单元格,然后单击 OK 按钮。 看截图:

到目前为止,所有图片均根据其相对名称插入到单元格中。 看右边的截图:

匹配导入图片 Kutools for Excel 的功能可以帮助Excel用户根据单元格值快速过滤图片,然后批量插入这些图片。此外,这些匹配的图片可以自动调整为指定的大小或单元格大小。 免费试用!


演示:插入多张图片并在Excel中一次调整它们的大小

Kutools for Excel 包括适用于Excel的300多种便捷工具,可以在30天之内免费试用。 立即免费试用!      现在购买!


相关文章

最佳办公生产力工具

🤖 Kutools 人工智能助手:基于以下内容彻底改变数据分析: 智能执行   |  生成代码  |  创建自定义公式  |  分析数据并生成图表  |  调用 Kutools 函数...
热门特色: 查找、突出显示或识别重复项   |  删除空白行   |  合并列或单元格而不丢失数据   |   不使用公式进行四舍五入 ...
超级查询: 多条件VLookup    多值VLookup  |   跨多个工作表的 VLookup   |   模糊查询 ....
高级下拉列表: 快速创建下拉列表   |  依赖下拉列表   |  多选下拉列表 ....
列管理器: 添加特定数量的列  |  移动列  |  切换隐藏列的可见性状态  |  比较范围和列 ...
特色功能: 网格焦点   |  设计图   |   大方程式酒吧    工作簿和工作表管理器   |  资源库 (自动文本)   |  日期选择器   |  合并工作表   |  加密/解密单元格    按列表发送电子邮件   |  超级筛选   |   特殊过滤器 (过滤粗体/斜体/删除线...)...
前 15 个工具集12 文本 工具 (添加文本, 删除字符,...)   |   50+ 图表 类型 (甘特图,...)   |   40+ 实用 公式 (根据生日计算年龄,...)   |   19 插入 工具 (插入二维码, 从路径插入图片,...)   |   12 转化 工具 (小写金额转大写, 货币兑换,...)   |   7 合并与拆分 工具 (高级组合行, 分裂细胞,...)   |   ... 和更多

使用 Kutools for Excel 增强您的 Excel 技能,体验前所未有的效率。 Kutools for Excel 提供了 300 多种高级功能来提高生产力并节省时间。  单击此处获取您最需要的功能...

产品描述


Office Tab 为 Office 带来选项卡式界面,让您的工作更加轻松

  • 在Word,Excel,PowerPoint中启用选项卡式编辑和阅读,发布者,Access,Visio和Project。
  • 在同一窗口的新选项卡中而不是在新窗口中打开并创建多个文档。
  • 每天将您的工作效率提高50%,并减少数百次鼠标单击!
Comments (47)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hello community,

Thank you very much - this is a great tool!
But for my request, I should keep the sizes of the images, which are different. Is there any way to keep the format of the images but keep the functions with this code?

Many thanks in advance.
Elias
This comment was minimized by the moderator on the site
Respected sir, i want to One image paste on specific cell more than one in a time.
This comment was minimized by the moderator on the site
Hello, Sarfraz

If you want to insert one image into multiple cells, you just need to insert one image and resize it, and then copy and paste it to the other cells as you need.

Thank you!
This comment was minimized by the moderator on the site
mình cảm ơn vì bài viết. mình có làm danh sách sản phẩm hàng hóa mất rất nhiều thời gian nhưng chợt thấy chenanhexcel.com có bán add-in thì công việc của mình dễ dàng hơn nhiều.
This comment was minimized by the moderator on the site
Hi, i have 10 images i want to insert all 10 inside ONE CELL in excel. is this possible and if so pls help me out with some code pls...
This comment was minimized by the moderator on the site
Hi Vind,
First, adjust the cell and make it big enough to contain the 10 images.
Then Click Insert > Picture to open the Insert Picture dialog. In the dialog, select the 10 images together (if they are in the same folder), and click the OK button.
Now all images are inserted. If necessary, resize them simultaneously in the Size group on the Picture Format tab.
These images are inserted in the diagonal line of the cell as attached picture, and you need to adjust their positions manually.
This comment was minimized by the moderator on the site
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
This comment was minimized by the moderator on the site
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
This comment was minimized by the moderator on the site
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.
This comment was minimized by the moderator on the site
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
This comment was minimized by the moderator on the site
les agradezco mucho realmente ayudan muchisimo con el trabajo y el tiempo. Me sirvio perfecto para un inventario con fotos.
reitero mi agradecimiento
This comment was minimized by the moderator on the site
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
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations