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 copy sheet and rename automatically in Excel?

In Excel, how could you copy a worksheet and rename it automatically without typing the name as usual? In this article, I will talk about how to copy a sheet one time or multiple times and give them specific names at once.

Copy a worksheet multiple times and rename them with increment tab names by using VBA code

Copy a worksheet multiple times and rename them with custom names by using Kutools for Excel



If you need to copy a worksheet multiple times, and give them series names, such as KTE-1, KTE-2, KTE-3, KTE-4…, the following VBA code can do you a favor.

1. Hold down the ALT + F11 keys to open the Microsoft Visual Basic for Applications window.

2. Click Insert > Module, and paste the following code in the Module Window.

VBA code: Copy a worksheet multiple times and rename at once:

Sub Create()
'Updateby Extendoffice 20160704
    Dim I As Long
    Dim xNumber As Integer
    Dim xName As String
    Dim xActiveSheet As Worksheet
    On Error Resume Next
    Application.ScreenUpdating = False
    Set xActiveSheet = ActiveSheet
    xNumber = InputBox("Enter number of times to copy the current sheet")
    For I = 1 To xNumber
        xName = ActiveSheet.Name
        xActiveSheet.Copy After:=ActiveWorkbook.Sheets(xName)
        ActiveSheet.Name = "KTE-" & I
    Next
    xActiveSheet.Activate
    Application.ScreenUpdating = True
End Sub

3. Then press F5 key to run this code, and a prompt box will remind you how many copies of the current worksheet that you want to copy, see screenshot:

doc rename copied sheets 1

4. Enter the number of copies into the popped dialog, and then click OK button, your current worksheet has been duplicated 5 copies and renamed with sequence name as following screenshot shown:

doc rename copied sheets 2

Note: In the above code, you can change the worksheet name text “KTE-” to your needed.


Maybe the above VBA codes are difficult for you to apply, here, I will introduce an easy tool- Kutools for Excel, with its Create Sequence Worksheets utility, you can achieve this task without any effort.

Kutools for Excel : with more than 300 handy Excel add-ins, free to try with no limitation in 60 days. 

After installing Kutools for Excel, please do as follows:

1. Click Enterprise > Worksheet > Create Sequence Worksheets, see screenshot:

doc rename copied sheets 3

2. In the Create Sequence Worksheets dialog box:

(1.) Select the worksheet name that you want to copy from the Base Worksheet drop down list;

(2.) Then specify the number of worksheet that you want to copy under The number of create text box;

(3.) And then check Sequence Numbers under the Sheet names based on section;

(4.) At last, create the sequence worksheet names in the right pane that you want, see screenshot:

doc rename copied sheets 4

3. After finishing the settings, please click Ok button, and the specific worksheet has been copied multiple times and renamed based on your created sequence in a new workbook, see screenshot:

doc rename copied sheets 5

Click Free Download Kutools for Excel Now !


Kutools for Excel: with more than 200 handy Excel add-ins, free to try with no limitation in 60 days. Download and free trial Now!


Excel Productivity Tools

Ribbon of Excel (with Kutools for Excel installed)

300+ Advanced Features Increase Your Productivity by 70%, and Help You To Stand Out From Crowd!

Would you like to complete your daily work quickly and perfectly? Kutools For Excel brings 300+ cool and powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) for 1500+ work scenarios, helps you solve 80% Excel problems.

  •  Deal with all complicated tasks in seconds, help to enhance your work ability, get success from the fierce competition, and never worry about being fired.
  •  Save a lot of work time, leave much time for you to love and care the family and enjoy a comfortable life now.
  •  Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands, and give you a healthy body.
  •  Become an Excel expert in 3 minutes, and get admiring glance from your colleagues or friends.
  •  No longer need to remember any painful formulas and VBA codes, have a relaxing and pleasant mind, give you a thrill you've never had before.
  •  Spend only $39, but worth than $4000 training of others. Being used by 110,000 elites and 300+ well-known companies.
  •  60-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years. Buy once, use forever.
  •  Change the way you work now, and give you a better life immediately!

Office Tab Brings Efficient And Handy Tabs to Office (include Excel), Just Like Chrome, Firefox, And New IE

  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Open and create documents in new tabs of same window, rather than in new windows.
  • Help you work faster and easily stand out from the crowd! One second to switch between dozens of open documents!
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.
    Ales · 1 years ago
    Is it possible that you add in this code an option to also copy specific cells. For example: I have in one cell Number 1 and I would like that when I duplicate Sheet will change for +1. Thanks
  • To post as a guest, your comment is unpublished.
    Anonymous · 2 years ago
    Wow this saved a lot of time for me! Thank you!