How to add new worksheet with current date 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 Current Date

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 "current Date."

Step 1

Start by saving 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 AddAndNameWithCurrentDate()
'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 'Create a new worksheet, and the name of the
sheet will be Sheet1 by default.
 ActiveSheet.Name = Format(Date, "dd-mm-yyyy") 'name with
the current date, this row may be deleted if all you want to
do is add another sheet.
 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

Create 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.

Now, click this new button to see its functionality.

As you can see, clicking the button opens a new sheet with the current date.

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 can give the Excel Worksheet a new name by right-clicking 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 in Excel with the current date.

Updated on: 10-Sep-2022

762 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements