跳到主要內容

如何在Excel中重命名多個工作表?

作者:技術支持 最後修改時間:2023-12-20

通常,要在Excel中重命名工作表,我們可以快速雙擊工作表選項卡,或右鍵單擊工作表選項卡以選擇重命名命令以重命名工作表。 在Excel中重命名一個或兩個工作表非常方便,但是如果我們想在一個操作中重命名多個工作表,該怎麼辦?

doc重命名工作表6

使用重命名命令重命名工作表

使用便捷的工具輕鬆地重命名多個工作表

使用VBA代碼重命名多個工作表


使用重命名命令重命名工作表


我們可以使用以下方法快速重命名Excel中的工作表: 重命名 根據以下過程命令:

右鍵單擊要重命名的工作表標籤,然後選擇 重命名 右鍵單擊菜單中的命令。 或雙擊工作表選項卡以重命名工作表。 然後鍵入一個新名稱,然後按 Enter 重命名它的密鑰,請參見屏幕截圖:

有了這個 重命名 命令,一次只能重命名一個工作表,為了重命名多個工作表,請重複上述操作。

使用每個工作表中的指定文字、儲存格值或特定儲存格值輕鬆重新命名多個工作表

Kutools for Excel 的重新命名多個工作表實用程式可以幫助您輕鬆地在 Excel 中同時重新命名多個工作表。 立即獲得 30 天的全功能免費試用!

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


使用便捷的工具輕鬆地重命名多個工作表

Kutools for Excel 的重新命名多個工作表工具對於重新命名目前工作簿的所有工作表或選定的特定工作表非常方便。

使用此工具,您可以通過在現有工作表名稱之前或之後添加額外的內容來快速重命名所有工作表或選定的特定工作表,或用新名稱替換原始工作表名稱。 您還可以通過使用範圍單元格的內容來重命名所有工作表或選定的工作表。

下載並安裝 Kutools for Excel,點擊 Kutools 加 > 下載學習單 > 重命名工作表 打開 重命名多個工作表 對話框。 那麼請執行以下操作:

情境 1. 使用 Kutools for Excel 重新命名具有特定資料的多個工作表

doc重命名工作表5

  1. 從工作表中選擇要重新命名的工作表 工作表 名單。
  2. 選擇您要重新命名其下的工作表的一種類型 重命名選項。
  3. 將具體數值輸入 從輸入框.
  4. 點擊 OK。 您將得到以下結果:

doc重命名工作表6

情境 2. 使用 Kutools for Excel 以儲存格值重新命名多個工作表

doc重命名工作表7

  1. 從工作表中選擇要重新命名的工作表 工作表 名單。
  2. 選擇您要重新命名其下的工作表的一種類型 重命名選項。
  3. 點擊  doc按鈕 按鈕以選擇您要基於其下的工作表命名的單元格值 從特定範圍 部分。
  4. 點擊 OK。 您將得到以下結果:

doc重命名工作表8

情境 3. 使用 Kutools for Excel 在每個工作表中使用特定儲存格值重新命名多個工作表

doc重命名工作表9

  1. 從工作表中選擇要重新命名的工作表 工作表 名單。
  2. 選擇您要重新命名其下的工作表的一種類型 重命名選項。
  3. 點擊  doc按鈕 按鈕以選擇您要基於其下的工作表命名的特定單元格值 重命名具有特定單元格的工作表 部分。
  4. 點擊 OK。工作表名稱已使用每個工作表中的特定儲存格值重新命名。

doc重命名工作表10

尖端:要使用此功能,您應該安裝 Excel的Kutools 首先,請 點擊下載並獲得 30 天免費試用

使用VBA代碼重命名多個工作表

在這裡,我將向您介紹兩個VBA代碼以重命名多個工作表。

程式碼 1. VBA 程式碼可一次以您想要的名稱重新命名多個工作表

使用以下VBA代碼,您可以快速重命名當前工作簿的所有工作表,這些工作表的工作表名稱具有相同的前綴,例如:KTE-order1,KTE-order 2和KTE-order 3…

1. 點擊 開發者 > Visual Basic中,然後點擊 插入 > 模塊 ,在 Microsoft Visual Basic應用程序Windows.

2. 請複制以下代碼並將其粘貼到 模塊.

VBA:通過輸入特定名稱重命名所有工作表

Sub ChangeWorkSheetName()
'Updateby20140624
Dim Rng As Range
Dim WorkRng As Range
On Error Resume Next
xTitleId = "KutoolsforExcel"
newName = Application.InputBox("Name", xTitleId, "", Type:=2)
For i = 1 To Application.Sheets.Count
    Application.Sheets(i).Name = newName & i
Next
End Sub

3.  點擊 文檔重命名多個工作表 4 按鈕執行代碼,然後在彈出對話框中輸入所需的名稱。請參見屏幕截圖:

doc重命名工作表2

4. 點擊 OK。 然後,您可以看到所有工作表都已重命名。

doc重命名工作表3

2. VBA代碼通過活動工作簿的每個工作表中的特定單元格值重命名多個工作表

使用以下VBA代碼,它將通過使用特定單元格的內容來重命名當前工作簿的所有工作表。 例如,您可以在整個工作簿的A1單元格中鍵入工作表名稱,然後將工作表重命名為單元格值A1。

1.  請指定一個單元格以在每個工作表中包含工作表名稱,然後在其中鍵入工作表名稱。 在本示例中,我將在每個工作表的單元格A1中鍵入工作表名稱。

2.  點擊 開發者 > Visual Basic中,然後點擊 插入 > 模塊 ,在 Microsoft Visual Basic應用程序 Windows操作系統。

3.  請複制以下代碼並將其粘貼到模塊中。

VBA:通過特定的單元格內容重命名工作表

Sub RenameTabs()
'Updateby20140624
 For x = 1 To Sheets.Count
 If Worksheets(x).Range("A1").Value <> "" Then
 Sheets(x).Name = Worksheets(x).Range("A1").Value
 End If
 Next
 End Sub

4.  點擊 文檔重命名多個工作表 4 按鈕執行代碼。 所有工作表均根據A1的單元格內容重命名。

筆記:

  • 在上面的代碼中, A1 是您要基於其重命名工作表的單元格內容,可以根據需要進行更改
  • 如果特定儲存格沒有內容,則不會重新命名特定儲存格的工作表。

演示:使用Kutools for Excel重命名多個工作表


Excel的Kutools:超過 300 個方便的工具觸手可及! 立即開始 30 天免費試用,沒有任何功能限制。 現在就下載!
Comments (23)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hi, I am trying to rename tabs but the rename function in the dropdown list is grey and I have no idea how to activte it. Please help.
Regards
John
This comment was minimized by the moderator on the site
Useless without kutools. What a waste of time.
This comment was minimized by the moderator on the site
i wants some requirments
1: i wants two or more blank sheets between two main sheets.

2: i want to copy one condent from sheet 1 to other sheets, at the same time the heading condet sheet name wil be chenged both sheets. that

sheet 01 heading is sheet 01. icopy the condent and paste it to other 1500 sheet at the same time i want to change the sheet name will be changed sheet 02, sheet 03 this orderly

3: i want to copy one condent from first sheet and i want to paste it some specific pages..
This comment was minimized by the moderator on the site
Good day,
Sorry can't help you with that yet. Welcome to post any question in our forum: https://www.extendoffice.com/forum.html to get more Excel support from out Excel professional or other Excel fans.
This comment was minimized by the moderator on the site
This is fab, I've been happily using '2. VBA code to rename multiple worksheets by specific cell value in each worksheet of the active workbook for months but now work have upgraded to Excel 2010 and it doesn't work anymore... can't find a similar solution online - any suggestions?
This comment was minimized by the moderator on the site
Thats great!!!, thank you very much for sharing vba codes. they are very useful
This comment was minimized by the moderator on the site
Thats great!!!, thank you very much for sharing vba codes. they are very useful
This comment was minimized by the moderator on the site
What if we want to have the numbers in descending order from 52 to 1?
This comment was minimized by the moderator on the site
I need to rename worksheets with data in cell Q5, however, multiple worksheets contain the same data in Q5. How can I tell Excel to rename those worksheets with the data in Q5 and just add something (like 1 or 2) after the name? I hope this makes sense.
This comment was minimized by the moderator on the site
I have tried to come up with something very similar, I have worksheet that has 2 columns and 119 rows. I need to take A1:B1 put them together and rename 3rd worksheet, next A2:B2, put them together and rename 4th worksheet, on until row 119. I have been hitting my head on the monitor trying to come up with easy way to do this. Any help would be much appreciated!
This comment was minimized by the moderator on the site
I have been looking for something very similar to these, however...I have sheet that has 2 columns and 119 rows. I need to combine A1:B1, start at the 3rd worksheet to rename the tab, next would be A2:B2, rename the 4th tab, so on and so forth. I have been beating my head against monitor and can't figure this one out...any help would be appreciate it.
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