How to insert current day or month or year into cell in Excel?
In Excel, professionals and everyday users alike often need to insert the current date, month, or year into a worksheet. Whether you are recording daily transactions, generating time-stamped reports, or tracking milestones, efficiently adding this information helps streamline your workflow and improve accuracy. Manually entering the date each time can be error-prone and time-consuming, especially in dynamic documents that require constant updating. This article introduces several practical methods to insert current date, month, or year into an Excel cell, as well as into the header or footer. You will also find alternative approaches using Excel formulas, keyboard shortcuts, dedicated Kutools features, and VBA automation—each with its own advantages and suited scenarios.
- Insert current year, month or date by formulas and hotkeys
- Insert current year, month or date with special date formatting
- Insert current date and time in cell/header/footer
- VBA: Automatically insert current date/month/year upon cell change or by button
Insert current year, month or date by formulas and hotkeys in Excel
Excel provides built-in functions and convenient keyboard shortcuts that allow you to quickly insert the current date, month, or year. These methods are ideal when you want Excel to display current date information that updates automatically, or need to manually input a time-stamp at a specific moment.
For example, to display the current month as a number, simply type the following formula in your desired cell: =MONTH(TODAY()) and press Enter. This will return the current month (e.g., 8 for August).
Formula | Formula returns | |
Insert Current Month (Number format) | =MONTH(TODAY()) | 8 |
Insert Current Month (Full name) | =TEXT(TODAY(),"MMMM") | August |
Insert Current Year | =YEAR(TODAY()) | 2015 |
Insert Current Date (Auto-updating) | =TODAY() | 2015/8/20 |
Insert Current Date and Time (Auto-updating) | =NOW() | 2015/8/20 9:41 |
Parameter notes:
- The formulas
=TODAY()
and=NOW()
update automatically whenever the worksheet recalculates, so the displayed date/time always remains current. =YEAR(TODAY())
returns the year as a four-digit number, while=TEXT(TODAY(),"MMMM")
provides the full name of the month.- If you want a static value (that does not change later), use the keyboard shortcuts below.
For static entries—such as when you want to record the date for a specific event and do not want the value to update in the future—keyboard shortcuts are especially useful:
(1) To immediately insert the current date into the selected cell, press CTRL + ;.
(2) To insert the current date and time in the same cell, first press CTRL + ; to insert the date, release the keys, then press the Space bar to add a space, and finally press CTRL + SHIFT + ; to add the current time.
Practical tips & reminders:
- Formulas that use
=TODAY()
or=NOW()
keep updating when the file recalculates, while keyboard entries are fixed once entered. - Be aware of your worksheet’s calculation mode. If the values do not auto-update, you may need to press F9 to refresh.
- If you are copying a formula to multiple rows, make sure to adjust cell references if needed.
Both of these approaches are widely applicable for data entry tables, daily logs, automated reports, and anywhere up-to-date date values are necessary. Pure formula methods are best when data must always reflect the latest date; keyboard approaches give you control for static record-keeping.
Insert current year, month or date with special date formatting
If you have Kutools for Excel installed, the Insert Date utility makes it simple to insert the current year, month, or day with your preferred date format in just a few clicks. This method is especially practical when you require consistent custom formatting or quick access to a calendar picker for flexible selection.
Kutools for Excel - Supercharge Excel with over 300 essential tools. Enjoy permanently free AI features! Get It Now
After installing Kutools for Excel, please refer to these steps:
1. Select the cell where you would like to insert the current year, month, or day. Then go to Kutools > Insert > Insert Date.
2. In the Insert Date dialog, ensure the Using format option is selected. Then double-click the desired date format from the list on the right. The selected formatting will be immediately applied to your active cell. See screenshot below:
Now, the current date appears in your chosen cell with the formatting you specified.
Notes & usage advice:
- By default, today’s date is already highlighted in the Insert Date dialog’s calendar. To insert a different date, just click the required date on the calendar before double-clicking your preferred format.
- This approach gives you flexibility to work with localized date formats, professional reporting templates, and any scenario where consistent visual presentation is important.
Kutools for Excel - Supercharge Excel with over 300 essential tools. Enjoy permanently free AI features! Get It Now
Insert Current date and time in cell/header/footer with Kutools for Excel
For scenarios that require stamping a worksheet with real-time information in the content area, header, or footer, Kutools for Excel provides the Insert Workbook Information utility. This feature is especially relevant for automated document control, auditing purposes, or consistent time-stamping on distributed reports, as it inserts accurate date and time data in just a few steps.
Kutools for Excel - Supercharge Excel with over 300 essential tools. Enjoy permanently free AI features! Get It Now
1. Click Kutools Plus > Workbook > Insert Workbook Information in the toolbar.
2. In the Insert Workbook Information dialog box, select the Current date and time option. In the Insert at section, specify where you want this information—options include any worksheet cell, as well as any area of the header or footer. Click OK to complete the insertion. Refer to the screenshot above for visual guidance.
The current date and time are now inserted exactly where you need them.
Additional tips:
- This approach is particularly helpful when you need to add revision dates, time-stamps for data exports, or printouts for physical records.
- Remember that data inserted in headers or footers is most visible in Page Layout or Print Preview view.
- Changes applied here do not automatically update unless you reapply the Insert Workbook Information utility.
Kutools for Excel - Supercharge Excel with over 300 essential tools. Enjoy permanently free AI features! Get It Now
VBA: Automatically insert current date, month, or year upon cell change or by button
For even greater automation—such as when you want Excel to record the exact date of entry each time a particular cell is modified, or you wish to trigger date stamping by clicking a button—VBA (Visual Basic for Applications) can be used. This method is highly applicable for log sheets, audit trails, or custom reporting where precise control is necessary. VBA allows you to dynamically insert the current date, month, or year based on your particular workflow requirements.
Scenario1: Automatically insert current date whenever a cell in a specified column or range is edited. This solution is ideal for creating "last modified" columns or automatic time-stamping of entries.
How to set up:
- Right-click the worksheet tab where you want the automation and select View Code.
- In the opened Microsoft Visual Basic for Applications window, paste the following code into the code pane:
Private Sub Worksheet_Change(ByVal Target As Range)
'Automatically insert current date when any change occurs in column B (adjust to your needs)
On Error Resume Next
xTitleId = "KutoolsforExcel"
If Not Intersect(Target, Range("B:B")) Is Nothing Then
Target.Offset(0, 1).Value = Date 'Inserts date in column C when column B changes
End If
End Sub
Operation tips:
- Any time you edit a cell in column B, the current date will automatically appear in the adjacent cell in column C (you can adjust target ranges and offsets as needed for your setup).
- To apply this logic to a different range or insert the month/year, modify
Date
toMonth(Date)
orYear(Date)
accordingly. - This method is best for audit logs or "last updated" date tracking. Make sure macros are enabled for this code to run properly.
Scenario2: Insert current date, month, or year by clicking a custom button, suitable for customized workflows or on-demand time-stamping.
How to set up:
- Click Developer > Visual Basic.
- In the VBA editor window, click Insert > Module
- Enter the following code (example shows insertion of current date into cell A1; you can modify the target cell or logic as needed):
Sub InsertCurrentDate()
On Error Resume Next
xTitleId = "KutoolsforExcel"
Worksheets("Sheet1").Range("A1").Value = Date
End Sub
How to Assign the Macro to a Button in Excel
- Insert the Button:
- Go to the Developer tab on the ribbon.
- Click Insert > Under Form Controls, choose Button (Form Control).
- Draw the button anywhere on your worksheet.
- Assign the Macro:
- After drawing the button, the Assign Macro window will pop up.
- Select InsertCurrentDate (or whatever you named your macro).
- Click OK.
Each time you click it, the current date will be inserted into cell A1 of Sheet1.
You can edit the macro to change the target cell, sheet, or insert the current month or year instead.
Troubleshooting & notes:
- If macros do not run, ensure you have enabled macros in your Excel settings.
- Test your VBA code on a sample workbook before applying it to important files to prevent unintended data loss.
- Combining VBA with worksheet controls allows for powerful and flexible workflow automation, but always save a backup prior to integrating new macros.
In summary, VBA solutions offer unmatched flexibility for automated time-stamping in Excel. They are especially recommended when standard formulas or tools do not fully meet your workflow needs.
Demo: insert current day, month, or year into cell/header/footer in Excel
Relative article:
Quickly insert current date with specific date format
Best Office Productivity Tools
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...
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!