跳到主要內容

如何在Excel中多次復制多張工作表?

有時,我們可能需要在工作簿中製作一個或多個指定工作表的副本。 這裡有一些快速的方法,可以幫助您輕鬆地在Excel中多次復制一個或多個工作表。


一次將多個工作表的一個副本複製到活動工作簿中,或使用“移動”或“複製”命令將其複製到另一個工作簿中

隨著 移動或複制 在Excel中使用命令,您可以一次將一個工作表,多個特定工作表或所有工作表的副本複製到活動工作簿或另一工作簿中。

1。 在要復制工作表的某個工作簿中,在“工作表”選項卡欄上選擇多個工作表。
備註:控股 CTRL 鍵,您可以選擇多個不相鄰的工作表標籤,並在“工作表標籤”欄上一一點擊它們; 保持 SHIFT 鍵,您可以通過單擊“工作表標籤”欄上的第一個工作表標籤和最後一個工作表標籤來選擇多個相鄰的工作表標籤。

2。 右鍵單擊“工作表標籤”欄上的選定工作表標籤,然後選擇 移動或複制 從上下文菜單中。 看截圖:
doc複製多張圖紙01

3。 在 移動或複制 對話框中,請指定以下設置:
(1)請指定要從中復制工作表的目標工作簿。 預訂 下拉列表。 您可以根據需要選擇活動的工作簿,另一個打開的工作簿或新的工作簿。
(2)在“圖紙選項卡”欄上指定要復制的圖紙的位置,您可以選擇所有現有的圖紙。
(3)檢查 建立副本 選項,如果您不選中此選項,則選定的工作表將被移到目標工作簿中。
(4)點擊 OK 按鈕。

現在,它將僅使選定的工作表一份複製到指定的工作簿中。 要製作這些工作表的多個副本,您可以多次重複該操作。

只需單擊幾下即可在活動工作簿中製作多個工作表的多個副本

通常,我們可以使用 移動或複制 Excel中的功能。 但是,此功能一次只能複制一份。 在這裡,用Kutools for Excel的 複製工作表 實用程序,只需單擊幾下,即可輕鬆在活動工作簿中製作所需數量的多個工作表副本。


廣告複製多個工作表01

Excel的Kutools - 使用 300 多種基本工具增強 Excel 功能。 享受全功能 30 天免費試用,無需信用卡! 立即行動吧!

使用VBA代碼將一個指定工作表的多個副本放入活動工作簿中

如果要復制指定工作表的10個副本,則 移動或複制 命令將是一種耗時的方法,您必須多次重複該操作。 但是,使用以下VBA代碼,您可以一次快速地將工作表複製10次。

1。 按住 ALT + F11 鍵,然後打開 Microsoft Visual Basic for Applications 窗口。

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中創建多個工作表的副本很簡單,但是如果要在當前工作簿中創建多個工作表的多個副本,則可能必須使用 移動或複制 命令項一次又一次。 是否想一鍵完成? 隨著 複製工作表 第三方加載項的實用程序 Excel的Kutools,您可以在Excel中一鍵製作多個工作表的多個副本。

Excel的Kutools - 使用 300 多種基本工具增強 Excel 功能。 享受全功能 30 天免費試用,無需信用卡! 立即行動吧!

1。 點擊 Kutools 加 > 複製工作表。 看截圖:

備註:點擊 Kutools 加 > 下載學習單 > 複製工作表 也將獲得此功能。

2。 套用設定 複製多個工作表 對話框:
(1)檢查要復制的工作表 複製所選的工作表 部分。
(2)指定 份數.
(3)確定所複製工作表的位置,例如,在所有工作表之前或之後,當前工作表之前或之後。
(4)點擊 Ok 按鈕。

3。 彈出提示框,提醒您已根據需要將選中的工作表複製多次,請單擊 OK 按鈕退出。 看截圖:

這個 複製多個工作表 的特點 Excel的Kutools 只需單擊幾下,即可在活動工作簿中製作多個指定工作表的多個副本。 免費試用!


將多個工作簿中的多個工作表的一個副本複製到一個新的工作簿中

如果您安裝了Kutools for Excel,則還可以應用其 合併工作表 僅需在Excel中單擊幾下,即可將多個工作表的一個副本從多個關閉的工作簿複製到一個新的工作簿中。

Excel的Kutools - 使用 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選項卡為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