How to add a new sheet with a specific name in Excel?


New Worksheets are continually being added to your Workbook. It might seem incredibly tedious to have to do everything by hand at times (specifically if you have multiple sheets to add).

Automating these monotonous tasks is a quick and easy way to solve the problem.

Using VBA to Add New Worksheet with Specific Name

I have programmed the Visual Basic for Applications (VBA) code to add a new Worksheet at the very end of the Worksheets and give it the label "specific name"

Step 1

Save the file and then go to the Developer menu and pick Visual Basic.

Or,

Simply pressing ALT + F11 will bring up the Visual Basic Editor.

Step 2

To access the project's workbook, right-click its name in the Project panel

Step 3

In order to access the VBA editor, go to the Insert menu and choose Module.

This is the VBA editor.

Step 4

Enter one of the codes that are listed below into the editing window (based on your requirement)

Sub AddAndNameWithSpecificName()
'Step 1: Tell Excel what to do in the event of an error.
 On Error GoTo Error

'Step 2: Create a new worksheet and give it a name that is
easily identifiable.
 Sheets.Add.Name = "My Specific Name" 'Create a new
worksheet and call it "My Specific Name," then replace "My
New Sheet" with your own name..
 Exit Sub

'Step 3: If there was a problem here, the user should be
informed.
Error:
 MsgBox "That is the name of an existing Worksheet in the
spreadsheet."
End Sub

Put an end to editing in the VBA environment.

To respond to the new sheet, you should make a button.

Step 5

Make a button by selecting the insert option in the developer tab and clicking it.

Step 6

Place the assigned macro script within this button. And press OK.

Step 7

This is the button that has been generated; you may rename it according to your specifications if you want.

in addition to clicking on this button.

Step 8

You may personalise a sheet and give it the name "My Specific Name." This will cause it to appear in the results automatically

Manually Add New Worksheet with Current Date

Consider the scenario in which you are compiling a record of the time spent on various tasks and want to quickly input the current date. Or you could wish to have the current date shown in a sheet in a way that is triggered automatically whenever the formulae are recalculated. There are a few different approaches one may use when inserting today's date into a sheet.

Step 1

When you first launch Microsoft Excel, you are presented with a menu that gives you the choice between a number of different worksheets, as is seen below.

Step 2

You have the option of picking one that corresponds to the prerequisites. Make a blank worksheet for the time being. The blank worksheet appears as shown down below.

Step 3

It is possible that you may get into a position in which you will need to append an additional worksheet to the side of the one that is already there. Excel Workbooks are collections of Excel worksheets that are kept together in one location. Right-clicking on the sheet name in the bottom sheet tracker tray allows you to insert a new worksheet into the document. This is shown in the following image.

Step 4

Create a new worksheet like the one shown below by choosing the "new worksheet" option from the list of choices that are now accessible to you.

Step 5

You will see a new dialogue box emerge on the screen, in which you will have the opportunity to pick the option to add a new sheet.

Step 6

You have the ability to give the Excel Worksheet a new name by rightclicking on the sheet's name and choosing the rename option from the dialogue box, as is shown in the following image.

Step 7

You are free to rename this sheet in current date, for example Sheet1, to current date.

Conclusion

In this tutorial, we explained how you can add a new worksheet with a specific name in Excel.

Updated on: 10-Sep-2022

460 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements