How to Automatically Record Date and Time Upon Data Entry in Excel
Question details
The user needs a method to automatically generate a permanent date and time stamp in adjacent cells whenever a specific value (like a temperature) is logged.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Creating an automated data logging sheet where the entry time is recorded statically and remains unchanged during subsequent workbook recalculations.
- Observed behavior
- The user aims to achieve static timestamps upon data entry without the timestamps continuously updating to the current time.
Ensure your target timestamp columns are properly formatted to display Dates (e.g., MM/DD/YYYY) and Times (e.g., HH:MM AM/PM) before applying the formulas.
Use Iterative Calculation and IF Formulas
Enable iterative calculation to allow circular references, enabling IF formulas to lock the date and time permanently once data is entered.
Standard volatile functions like TODAY() and NOW() recalculate every time the worksheet updates. By enabling iterative calculation, we can intentionally use a circular reference to lock the timestamp value the moment a target cell is filled.
Go to File > Options > Formulas (or Excel > Preferences > Calculation on Mac) and check the box for 'Enable iterative calculation'.
In cell A2, enter the formula: =IF(C2="","",IF(A2="",TODAY(),A2)). This checks if C2 has data; if it does, and A2 is empty, it stamps today's date.
In cell B2, enter the formula: =IF(C2="","",IF(B2="",NOW()-TODAY(),B2)). This extracts and locks the current time when data is entered in C2.
Select cells A2 and B2, then click and drag the fill handle down to copy these formulas to the remaining rows in your log.
Type a temperature or any data into column C. Columns A and B will automatically populate with the current static date and time.
Use a VBA Event Macro for Permanent Timestamps
Use a Worksheet_Change VBA macro to automatically insert a static timestamp when a cell is updated, avoiding the need for iterative calculations.
Easily Manage Data Logs with WPS Spreadsheet
WPS Spreadsheet fully supports iterative calculations and complex formulas, making it incredibly easy to create automated, static timestamps for your data entry tasks without needing to write scripts.
- 1. Enable Iterative Calculation: Open your sheet in WPS Spreadsheet, click Menu > Options > Calculation, and check 'Enable iterative calculation'.
- 2. Apply Timestamp Formulas: Use the IF and TODAY()/NOW() formula structure in your date and time columns.
- 3. Log Your Data: Simply type your entries into the target column, and WPS Spreadsheet will instantly generate and lock the timestamps.

Frequently Asked Questions
Why does my timestamp keep updating to the current time?
If you use =NOW() or =TODAY() without enabling iterative calculation and the circular reference IF structure, the spreadsheet will recalculate the function every time any cell is updated. Iterative calculation stops this by allowing the cell to reference its own existing value once populated.
What happens to the timestamp if I edit the temperature value later?
With the iterative formula method, editing the value in Column C will not change the existing timestamp because the IF function detects that the timestamp cell is already populated. If you clear the value in Column C, the timestamp will disappear.
Is the Iterative Calculation setting applied to the whole workbook?
Yes, enabling iterative calculation applies to the entire spreadsheet application while that workbook is open. You should be careful, as it might mask unintentional circular reference errors in other formulas within the workbook.
Can I use a keyboard shortcut instead of formulas to record the time?
Yes. If you prefer manual entry, you can press 'Ctrl + ;' to insert the current static date and 'Ctrl + Shift + ;' to insert the current static time. However, this requires manual input each time and is not automated.




