Skip to main content

How to add new sheet with specific name in Excel?

Author: Siluvia Last Modified: 2020-07-02

Sometimes, you want to create a new sheet and automatically name it with a specific name in Excel. In this article, we will show you two methods of adding new sheet with specific name in current workbook, as well as creating a worksheet with specific name in a new workbook in Excel.

Auto adding new sheet with specific name in current workbook with VBA code
Auto adding new sheet with specific name in a new workbook with Kutools for Excel


Auto adding new sheet with specific name in current workbook with VBA code

You can add a new sheet with certain name at the end of current workbook with following VBA code.

1. Press Alt + F11 keys simultaneously to open the Microsoft Visual Basic for Applications window.

2. In the Microsoft Visual Basic for Applications window, click Insert > Module.

3. Copy and paste below VBA code into the Module window.

VBA code: add new sheet with specific name at the end of current workbook

Sub CreateSheet()
'Updated by ExtendOffice 20181009
    Dim xName As String
    Dim xSht As Object
    On Error Resume Next
    xName = InputBox("Please enter a name for this new sheet ", "Kutools for Excel")
    If xName = "" Then Exit Sub
        Set xSht = Sheets(xName)
        If Not xSht Is Nothing Then
            MsgBox "Sheet cannot be created as there is already a worksheet with the same name in this workbook"
            Exit Sub
            End If
            Sheets.Add(, Sheets(Sheets.count)).Name = xName
        End Sub

4. Press F5 key to run the code. In the popping up Kutools for Excel dialog box, please enter a name for this sheet, and then click the OK button. See screenshot:

Then a new worksheet is created with specific name and located at the end of current workbook.


Auto adding new sheet with specific name in a new workbook with Kutools for Excel

In this section, we will introduce the Create Sequence Worksheets utility of Kutools for Excel. With this utility, you can easily add new sheet with specific name in a new workbook.

Before applying Kutools for Excel, please download and install it firstly.

1. For adding new sheet with specific name, you need to type this name into a cell in advance. And then click Kutools Plus > Worksheet > Create Sequence Worksheets.

2. In the Create Sequence Worksheets dialog box, select Blank worksheet in the Base Worksheet drop-down list, select Datain a range option, and specify the cell that contains the certain worksheet name, and finally click the OK button. See screenshot:

Then a new worksheet with this specific name from a cell is created in a new workbook immediately.

Notes:

1. If you want to create multiple new sheets with specific names at the same time, please enter these names in cells one by one, and then select these cells in the Data in a range box.
2. You can also create sequence worksheets from a series numbers or a custom list with this Create Sequence Worksheets utility. See screenshot:

  If you want to have a free trial (30-day) of this utility, please click to download it, and then go to apply the operation according above steps.

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...

Description


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
Comments (5)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hi, this does not properly account for user clicking cancel. It still creates worksheet.
This comment was minimized by the moderator on the site
Hi
The code has been updated with the problem solving. Please have a try and thanks for your comment.
This comment was minimized by the moderator on the site
Hi, I'm quite new to VBA, the above code works great for adding a new spreadsheet and renaming it, however I would then like it to automatically copy and paste the contents on my 'template' sheet into the new sheet? Can anybody help please?

Thanks
This comment was minimized by the moderator on the site
Good day,
Please try the below VBA code. Hope it can help. Thanks for your comment.

Sub CreateSheet()
Dim xName As String
Dim xSht As Object
Dim xNWS As Worksheet
On Error Resume Next
xName = Application.InputBox("Please enter a name for this new sheet ", "Kutools for Excel")
If xName = "" Then Exit Sub
Set xSht = Sheets(xName)
If Not xSht Is Nothing Then
MsgBox "Sheet cannot be created as there is already a worksheet with the same name in this workbook"
Exit Sub
End If
ActiveSheet.Copy after:=Sheets(Sheets.count)
Set xNWS = Sheets(Sheets.count)
xNWS.Name = xName
End Sub
This comment was minimized by the moderator on the site
Thank you for your reply crystal! I have it working now :)
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations