logo
search
VBA & Macro Problems

How to Add Automatic Date and Time Stamps in Excel

John WilsonJohn Wilson Sep 29, 2026 873 views

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.

How to Add Automatic Date and Time Stamps in Excel
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.
Before you start

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

Solution 1

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.

1
Select the target cell

Click on the cell where you want to insert the timestamp.

2
Insert the current date

Press Ctrl + ; (semicolon) on your keyboard to instantly insert the current date.

3
Insert the current time

To insert the current time, press Ctrl + Shift + ; (semicolon).

4
Format the cell

Press Enter to confirm. You can right-click the cell, select Format Cells, and adjust the Date or Time formatting as needed.

Static Values: These shortcuts insert fixed values. Unlike the =TODAY() or =NOW() functions, they will not update automatically when you reopen the workbook or recalculate the sheet.
Automate Data Entry

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. 1. Open your workbook in WPS Spreadsheet: Launch WPS Office and open your existing spreadsheet or create a new one.
  2. 2. Access the Macro tools: Navigate to the Tools tab on the top ribbon and click on Macro to open the VBA Editor.
  3. 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. 4. Save your automated workbook: Click Menu > Save As, and select the Macro-Enabled Workbook (.xlsm) format to keep your automatic timestamping active.
100% compatible with Microsoft Excel (.xlsx and .xlsm) formats.Fully supports VBA macros for automating repetitive tasks like timestamping.Lightweight architecture ensures smooth operation even on older devices.Intuitive user interface that requires zero learning curve for regular Excel users.
microsoft office alternative - wps office

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.