How to Add Automatic Date and Time Stamps in Excel
Question details
The user needs to know how to add date and time stamps in Excel, specifically looking for methods to automatically generate timestamps when data is entered into a cell.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Tracking data entry times or logging modifications in an Excel spreadsheet.
- Observed behavior
- Users need a way to log timestamps upon data entry without the values updating dynamically like the volatile =NOW() function, requiring either manual shortcuts or automated VBA solutions.
Decide whether you need a static timestamp that remains unchanged or a dynamic, automated timestamp triggered by data entry. If using the automated VBA method, ensure your workbook is saved as an Excel Macro-Enabled Workbook (.xlsm).
Insert Static Date and Time Stamps Using Keyboard Shortcuts
Use this method if you quickly need to manually log the current date or time in a specific cell.
Excel provides built-in keyboard shortcuts to instantly insert the current date and time. Unlike formulas, these shortcuts hardcode the value into the cell, meaning it will not change the next time you open the workbook.
Click on the cell where you want to insert the timestamp.
Press Ctrl + ; (semicolon) on your keyboard to instantly insert the current date.
To insert the current time, press Ctrl + Shift + ; (semicolon).
Press Enter to confirm. You can right-click the cell, select Format Cells, and adjust the Date or Time formatting as needed.
Create Automatic Timestamps Using a VBA Macro
Set up a Worksheet_Change macro to automatically insert a permanent timestamp in an adjacent column whenever data is entered.
Automate Timestamps Seamlessly with WPS Spreadsheet
WPS Spreadsheet fully supports VBA macros and provides the same robust functionality as Microsoft Excel for automating your date and time stamps, absolutely free.
- 1. Open your workbook in WPS Spreadsheet: Launch WPS Office and open your existing spreadsheet or create a new one.
- 2. Access the Macro tools: Navigate to the Tools tab on the top ribbon and click on Macro to open the VBA Editor.
- 3. Insert the timestamp script: Double-click your active sheet in the project explorer and paste your Worksheet_Change VBA code to handle automatic timestamps.
- 4. Save your automated workbook: Click Menu > Save As, and select the Macro-Enabled Workbook (.xlsm) format to keep your automatic timestamping active.

Frequently Asked Questions
Why does my =NOW() formula constantly change instead of staying as a fixed timestamp?
The =NOW() and =TODAY() functions are volatile, meaning they recalculate and update to the current system time whenever the worksheet recalculates or is reopened. To keep a timestamp fixed, you must use keyboard shortcuts (Ctrl + ;) or a VBA macro.
Can I format the timestamp to show both date and time in the exact same cell?
Yes. After inserting the value, right-click the cell and select Format Cells. Navigate to the Custom category and enter a format code like 'mm/dd/yyyy hh:mm AM/PM' to display both date and time together.
Do Office Scripts work for automatic timestamps in the web version of Excel?
Yes. If you are using Excel for the Web, standard VBA macros are not supported. Instead, you can use Office Scripts combined with Power Automate to trigger automatic timestamps upon data entry, serving as a cloud-friendly alternative.





