How to Automatically Record a Static Excel Entry Date Without Updating
Question details
The user wants to automatically insert a static date when text is entered into a cell, ensuring the date does not update when the workbook is reopened.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Tracking data entry by automatically generating a timestamp that remains permanent for each record.
- Observed behavior
- Using standard date formulas like =TODAY() or =NOW() causes the date to dynamically recalculate and display the current date whenever the workbook is opened, losing the original entry date.
Since built-in functions like TODAY() are dynamic by design, creating a permanent, automated date requires a VBA macro. Ensure your workbook is ready to be saved as a Macro-Enabled Workbook (.xlsm).
Use a VBA Worksheet_Change Event
Applying a VBA event script ensures that a permanent date is written into the corresponding cell as plain text or a static value immediately after new data is entered.
Formulas inherently recalculate upon opening or modifying a file. By using a Worksheet_Change event in VBA, you can instruct Excel to automatically type the current date (acting like a hardcoded value) the moment you edit a target cell. This prevents the date from ever changing automatically again.
Right-click the specific worksheet tab at the bottom of your screen where you want this feature applied, and select 'View Code' to open the Visual Basic Editor.
In the blank module window that appears, paste the following code: Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Range("B2:B100"), Target) Is Nothing Then Application.ScreenUpdating = False Application.EnableEvents = False Intersect(Range("B2:B100"), Target).Offset(0, 5).Value = Date Application.EnableEvents = True Application.ScreenUpdating = True End If End Sub
Change 'B2:B100' to match the column range where you will be typing your data. Change 'Offset(0, 5)' to match the column where the date should appear (e.g., an offset of 5 means 5 columns to the right of the edited cell).
Close the VBA editor. Go to File > Save As, and choose 'Excel Macro-Enabled Workbook (*.xlsm)' from the format dropdown. If you do not save it as an .xlsm file, the macro will be deleted upon closing.

Manually Insert a Static Date Using Keyboard Shortcuts
If you only need to insert static dates occasionally and want to avoid using macros, Excel has built-in keyboard shortcuts to instantly drop a permanent date or time into a cell.
Easily Automate Spreadsheets with WPS Office
WPS Spreadsheet offers comprehensive support for VBA macros, allowing you to easily automate tasks like static date entries. With high compatibility with Microsoft Excel formats, you can run, edit, and save macro-enabled files seamlessly.
- 1. Open Your File in WPS Spreadsheet: Launch WPS Office and open your spreadsheet document.
- 2. Access the VBA Editor: Navigate to the 'Developer' tab and click on 'Visual Basic', or simply right-click the worksheet tab and choose 'View Code'.
- 3. Apply the Macro: Paste your Worksheet_Change event code to enable automatic static date generation.
- 4. Save with Macro Support: Click 'Save As' and select the '.xlsm' format to keep your automated functions intact for future use.

Frequently Asked Questions
Why does the TODAY() function change the date every day?
The TODAY() function is volatile, meaning Excel recalculates it every time the spreadsheet is opened or when any change is made. It is designed to always display the current system date, not to preserve historical entry timestamps.
Will this macro work if I share the file with someone else?
Yes, but the recipient must also open the file in an application that supports VBA (like Excel or WPS Office) and they must click 'Enable Macros' or 'Enable Content' when the security warning appears upon opening the .xlsm file.
Can I use circular references to keep a static date without using macros?
While it is technically possible to create a static timestamp using an IF statement, circular references, and enabling 'Iterative Calculation' in settings, this method is highly unstable. It can easily break, cause performance issues, or hide legitimate calculation errors elsewhere in your workbook. Using a VBA macro is the standard, reliable solution.
How do I make the date appear in the same cell that I am editing?
Using the Worksheet_Change event to overwrite the cell you are actively typing in will replace your typed data with the date. To avoid data loss, timestamps should always be directed to an adjacent cell using the 'Offset' command in the VBA script.




