跳到主要内容

如何在Excel中多次复制多张工作表?

有时,我们可能需要在工作簿中制作一个或多个指定工作表的副本。 这里有一些快速的方法来帮助您轻松地在Excel中多次复制一个或多个工作表。


一次将多个工作表的一个副本复制到活动工作簿中,或使用“移动”或“复制”命令将其复制到另一个工作簿中

随着 移动或复制 在Excel中使用命令,您可以一次将一个工作表,多个特定工作表或所有工作表复制到活动工作簿或另一工作簿中。

1。 在要复制工作表的某个工作簿中,在“工作表”选项卡栏上选择多个工作表。
备注:控股 CTRL 键,您可以选择多个不相邻的工作表标签,并在“工作表标签”栏上一一点击它们; 保持 SHIFT 键,可以通过单击“工作表标签”栏上的第一个工作表标签和最后一个工作表标签来选择多个相邻的工作表标签。

2。 右键单击“工作表标签”栏上的选定工作表标签,然后选择 移动或复制 从上下文菜单中。 看截图:
doc复制多张图纸01

3。 在 移动或复制 对话框中,请指定以下设置:
(1)请指定要从中复制工作表的目标工作簿。 预订 下拉列表。 您可以根据需要选择活动的工作簿,另一个打开的工作簿或新的工作簿。
(2)在“图纸选项卡”栏上指定要复制的图纸的位置,您可以在所有现有图纸之后进行选择。
(3)检查 建立副本 选项,如果您不选中此选项,则选定的工作表将被移到目标工作簿中。
(4)点击 OK 按钮。

现在,它将仅将所选工作表复制到指定的工作簿中。 要制作这些工作表的多个副本,您可以多次重复该操作。

只需单击几下即可在活动工作簿中制作多个工作表的多个副本

通常,我们可以使用 移动或复制 Excel 中的功能。但是,此功能一次只能制作一份副本。在这里,使用 Kutools for Excel's 复制工作表 实用程序,只需单击几下,您就可以轻松地在活动工作簿中制作所需数量的多个工作表副本。


广告复制多个工作表01

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

使用VBA代码将一个指定工作表的多个副本放入活动工作簿中

如果要复制指定工作表的10个副本,则 移动或复制 命令将是一种耗时的方法,您必须多次重复该操作。 但是,使用以下VBA代码,您可以一次快速地将工作表复制10次。

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

2。 点击 插页 > 模块,然后将以下代码粘贴到“模块窗口”中。

VBA:将某个工作表的多个副本放入活动工作簿中

Sub Copier ()
Dim x As Integer
x = InputBox("Enter number of times to copy Sheet1")
For numtimes = 1 To x
ActiveWorkbook.Sheets("Sheet1").Copy _
After:=ActiveWorkbook.Sheets("Sheet1")
Next
End Sub

备注:在上面的代码中,替换为“Sheet1”和要复制的工作表的名称。

3。 然后按 F5 键以运行代码,将出现一个提示框,询问您所需的印张数量。

4。 然后点击 OK,指定的工作表已在活动工作簿中复制了100次。


使用 Kutools for Excel 将多个工作表的多个副本制作成活动工作簿

虽然在Excel中制作多个工作表的副本很简单,但是如果要在当前工作簿中制作多个工作表的多个副本,则可能必须使用 移动或复制 命令项一次又一次。 是否想一键完成? 随着 复制工作表 第三方加载项的实用程序 Kutools for Excel,您可以在Excel中一键制作多个工作表的多个副本。

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

1。 点击 Kutools 加 > 复制工作表。 看截图:

备注:点击 Kutools 加 > 工作表 > 复制工作表 也将获得此功能。

2。 套用设定 复制多个工作表 对话框:
(1)检查要从中复制的工作表 复制所选的工作表 部分。
(2)指定 份数.
(3)确定所复制工作表的位置,例如,在所有工作表之前或之后,当前工作表之前或之后。
(4)点击 Ok 按钮。

3。 弹出提示框,提醒您已根据需要将选中的工作表复制多次,请单击 OK 按钮退出。 看截图:

本篇 复制多个工作表 的特点 Kutools for Excel 只需单击几下,即可在活动工作簿中制作多个指定工作表的多个副本。 免费试用!


将多个工作表中的多个工作表的一个副本复制到一个新的工作簿中

如果您安装了 Kutools for Excel,您也可以应用它 合并工作表 仅需在Excel中单击几下,即可将多个工作表的一个副本从多个关闭的工作簿复制到一个新的工作簿中。

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

1。 点击 Kutools 加 > 结合 激活合并工作表功能。

2。 在[合并工作表–第1步,共3步]向导中,请检查 将工作簿中的多个工作表合并为一个工作表 选项,然后单击 下一页 按钮。 看截图:

3。 在“合并工作表–第2步,共3步”向导中,请执行以下显示的屏幕截图:
(1)点击 地址 > 文件 or 要添加工作簿,您将从中复制工作表。
(2)在 工作簿清单 部分,检查要复制其工作表的工作簿;
(3)在 工作表清单 部分,检查您将复制的工作表;
(4)在上方重复 (2) (3) 从其他工作簿中选择工作表,您将要复制。
(5)点击 下一页 按钮。

4。 在“合并工作表-第3步,共3步”向导中,请根据需要配置复制设置,然后单击 完成 按钮。

5。 现在,在新对话框中,请指定目标文件夹以保存新工作簿,并在 文件名 框,然后单击 保存 按钮。 看截图:

现在,将出现另外两个对话框,要求您打开新工作簿并保存组合方案,请根据需要单击按钮。 到目前为止,它一次已从多个工作簿复制了所有指定的工作表。

有了这个 合并(工作表) 实用程序,您可以轻松地复制和合并工作表和工作簿,如下所示。 免费试用!
(1)将工作簿中的多个工作表/范围快速组合为一个工作表;
(2)快速将工作簿中所有相同名称的工作表合并/合并为一个工作表;
(3)快速将工作表或工作簿合并/合并为一个工作簿;
(4)将来自多个工作表的数据快速汇总/计算为一个工作表。

最佳办公生产力工具

🤖 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 (25)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
I am new to this I am just trying to make copies of the same sheet this is the code I am using. Sub Copier() Dim s As String Dim numtimes As Integer Dim numCopies As Integer numCopies = InputBox("How many copies do you need?") s = InputBox("Enter the name of the Worksheet you want to copy") For numtimes = 1 To numCopies ActiveWorkbook.Sheets(s).Copy _ After:=ActiveWorkbook.Sheets(Worksheets.Cou nt) Next End Sub when i use the code it gives me the error of "Syntax Error" then this text turns red ActiveWorkbook.Sheets(s).Copy _ After:=ActiveWorkbook.Sheets(Worksheets.Cou nt) and the is text turns yellow Sub Copier() what can i do to fix it.
This comment was minimized by the moderator on the site
Working Code

Sub Copier()
Dim s As String
Dim numtimes As Integer
Dim numCopies As Integer
numCopies = InputBox("How many copies do you need?")
s = InputBox("Enter the name of the Worksheet you want to copy")
For numtimes = 1 To numCopies
ActiveWorkbook.Sheets(s).Copy After:=ActiveWorkbook.Sheets(Worksheets.Count)
Next
End Sub

copy the entire line from ActiveWorkbook.Sheets...... that was the problem, and some spaces

Have a great day
This comment was minimized by the moderator on the site
[quote]I am new to this I am just trying to make copies of the same sheet this is the code I am using. Sub Copier() Dim s As String Dim numtimes As Integer Dim numCopies As Integer numCopies = InputBox("How many copies do you need?") s = InputBox("Enter the name of the Worksheet you want to copy") For numtimes = 1 To numCopies ActiveWorkbook.Sheets(s).Copy _ After:=ActiveWorkbook.Sheets(Worksheets.Cou nt) Next End Sub when i use the code it gives me the error of "Syntax Error" then this text turns red ActiveWorkbook.Sheets(s).Copy _ After:=ActiveWorkbook.Sheets(Worksheets.Cou nt) and the is text turns yellow Sub Copier() what can i do to fix it.By Tyler Dempsey[/quote] Here is the exact code you want to use: Sub Copier() Dim s As String Dim numtimes As Integer Dim numCopies As Integer numCopies = InputBox("How many copies do you need?") s = InputBox("Enter the name of the Worksheet you want to copy") For numtimes = 1 To numCopies ActiveWorkbook.Sheets(s).Copy _ After:=ActiveWorkbook.Sheets(Worksheets.Count) Next End Sub
This comment was minimized by the moderator on the site
Thank you, the last one saved my life :)
This comment was minimized by the moderator on the site
[quote]I am new to this I am just trying to make copies of the same sheet this is the code I am using. Sub Copier() Dim s As String Dim numtimes As Integer Dim numCopies As Integer numCopies = InputBox("How many copies do you need?") s = InputBox("Enter the name of the Worksheet you want to copy") For numtimes = 1 To numCopies ActiveWorkbook.Sheets(s).Copy _ After:=ActiveWorkbook.Sheets(Worksheets.Cou nt) Next End Sub when i use the code it gives me the error of "Syntax Error" then this text turns red ActiveWorkbook.Sheets(s).Copy _ After:=ActiveWorkbook.Sheets(Worksheets.Cou nt) and the is text turns yellow Sub Copier() what can i do to fix it.By Tyler Dempsey[/quote] Double check your code and make sure you don't have a space at ActiveWorkbook. Sheets(s).Copy _ or at Sheets(Worksheets.Cou nt)
This comment was minimized by the moderator on the site
Fantastic VBA code - really helped
This comment was minimized by the moderator on the site
When I first tried it, I got the error message because I didn't change the name Sheet1. After I realized what caused the error, I researched a little further, as I did not want to be manually entering the sheet name into the macro. And when I need this feature, it is almost always for the current sheet. I added the line a = activesheet.name And revised the line after:=activeworkbook.sheets("sheet1") to activeworkbook.sheets(a).copy _ That worked very well, but I did notice the numbering was reversed ... that didn't bother me as I was going to manually rename the new sheets anyway. When I saw Schuyler's post, I further revised the line activeworkbook.sheets(a).copy _ to after:=activeworkbook.sheets(worksheets.count) I am now satisfied with the result. My finished macro: Sub copies() Dim x As Integer x = InputBox("Enter number of times to copy Sheet1") For numtimes = 1 To x ActiveWorkbook.Sheets("Sheet1").Copy _ After:=ActiveWorkbook.Sheets(Worksheets.Count) Next End Sub --- All the best, Barry
This comment was minimized by the moderator on the site
i got syntax error on "After:=ActiveWorkbook.Sheets(Worksheets.Count)


but i dunno whats wrong... Can u help me please?
This comment was minimized by the moderator on the site
Thank you so much Barry. Your finished macro is the only thing that worked for me.
This comment was minimized by the moderator on the site
where i will insert this above code in vba should i create common button then inside ?? regards.
This comment was minimized by the moderator on the site
Follow the below steps:
1. Copy the above code
2. Hold down the ALT + F11 keys, and it opens the Microsoft Visual Basic for Applications window.
2. Click Insert > Module, and paste the following code in the Module Window.
4.Then press F5 key to run the code
5.A prompt box appears to ask you the number of sheet copies you want.
This comment was minimized by the moderator on the site
I get an error that 'numtimes' is not defined...?
This comment was minimized by the moderator on the site
I got the same error as Theou and no one seems to have addressed it. My tabs are already named PO 51, PO 52, etc. and I replaced Sheet1 with PO 51 to copy that and got the subscript error out of range (9) I followed Schuyler's code to get the right order, but I still get the error and it's always due to these two lines: ActiveWorkbook.Sheets(s).Copy _ Before:=ActiveWorkbook.Sheets(Worksheets.Count)
This comment was minimized by the moderator on the site
[quote]I got the same error as Theou and no one seems to have addressed it. My tabs are already named PO 51, PO 52, etc. and I replaced Sheet1 with PO 51 to copy that and got the subscript error out of range (9) I followed Schuyler's code to get the right order, but I still get the error and it's always due to these two lines: ActiveWorkbook.Sheets(s).Copy _ Before:=ActiveWorkbook.Sheets(Worksheets.Count)By Debbi[/quote] Can you include your complete code to make it easier to debug? A "subscript error out of range" usually means that the code references something that doesn't exist. I find this in my own code when I've got a typo or something of that nature.
This comment was minimized by the moderator on the site
how to copy with same column widths
This comment was minimized by the moderator on the site
Same column widths as the original Worksheet or do you want all of the column widths to be the same?
This comment was minimized by the moderator on the site
yes it works thanks I have successfully make multiple copies of a single worksheet in same workbook by using vba code thnx a lot.
This comment was minimized by the moderator on the site
Search for word "After" and change it to "Before". This will create copies in right order "Before" Sheet1. The only thing to rememeber is that numbering will always start from (2) as the original sheet will always be counted as 1st copy. Also you can replace "Sheet1" with name of the tab you are trying to copy.
This comment was minimized by the moderator on the site
[quote]Using the VBA code, the naming of the duplicated worksheets is in reverse order. Let's say I make 10 copies of Sheet1, I'll end up with Sheet1, Sheet1(10), Sheet1(9), Sheet1(8),.......is it possible to have them in normal order?By MichaelTadashi[/quote] Anyone was able to answer this question? I need to create 72 copies, but it would be needed to have them in order (1 throught 72, intead of 72 through 1) Thanks!
This comment was minimized by the moderator on the site
[quote][quote]Using the VBA code, the naming of the duplicated worksheets is in reverse order. Let's say I make 10 copies of Sheet1, I'll end up with Sheet1, Sheet1(10), Sheet1(9), Sheet1(8),.......is it possible to have them in normal order?By juan[/quote] Anyone was able to answer this question? I need to create 72 copies, but it would be needed to have them in order (1 throught 72, intead of 72 through 1) Thanks!By MichaelTadashi[/quote]e] If you want the sheet copies to be in sequential order instead of backwards, change the following line... After:=ActiveWorkbook.Sheets("Sheet1") to this... After:=ActiveWorkbook.Sheets(Worksheets.Count) My completed code looked like the following which uses 2 InputBox prompts to allow for a dynamic copy count and worksheet name.. Sub Copier() Dim s As String Dim numtimes As Integer Dim numCopies As Integer numCopies = InputBox("How many copies do you need?") s = InputBox("Enter the name of the Worksheet you want to copy") For numtimes = 1 To numCopies ActiveWorkbook.Sheets(s).Copy _ After:=ActiveWorkbook.Sheets(Worksheets.Count) Next End Sub
This comment was minimized by the moderator on the site
How do i get the coppies continuous numbered. If the sheet i want to copy is named I002, and i want the next to be named I003,I004,I005 an so on.
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