Insert and Update a Date When an Excel Cell Changes
Question details
The user wants to insert a date in one Excel cell when another cell is populated or modified.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A worksheet needs either a current date associated with a populated cell or a recorded date that changes when the cell is edited.
- Observed behavior
- The desired result is a date displayed in a separate cell, with its update behavior suited to the chosen method.
Choose the cell to monitor and the cell that will display the date. The examples below use A1 as the monitored cell and B1 as the date cell; decide whether you need a moving current date or a recorded edit date.
Show Today's Date When a Cell Is Populated
Use a formula when the displayed date should remain current rather than record the date of an edit.
Select B1 and enter =IF(A1<>"",TODAY(),""). Replace A1 with the cell you want to check.
Select B1, open Home > Number Format, and choose a date format if the result appears as a number.
Enter a value in A1. B1 displays the current date; clearing A1 leaves B1 blank.

Record the Edit Date with a Worksheet VBA Event
Use this desktop Excel method when B1 should retain the date of the most recent edit to A1.
Show Today's Date in WPS Spreadsheets
Use an IF formula with TODAY in WPS Spreadsheets to display the current date whenever a reference cell contains a value. The date updates on recalculation; it is not a permanent edit timestamp.
- 1. Open the workbook: Open WPS Spreadsheets and select Open to choose your workbook.
- 2. Enter the formula: Select B1 and enter =IF(A1<>"",TODAY(),""). Change A1 to your reference cell if needed.
- 3. Apply a date format: Select B1 and use the number format controls on the Home tab to choose a date format.
- 4. Check the result: Enter a value in A1 and confirm that B1 displays today's date.

Frequently Asked Questions
Will TODAY record the date when I first entered a value?
No. =IF(A1<>"",TODAY(),"") shows the current date when A1 is populated and can change when the workbook recalculates. Use a worksheet change event for a recorded edit date.
Can the VBA method record the time as well as the date?
Yes. In the worksheet event, replace Date with Now and change the NumberFormat to include a time, such as "mm/dd/yyyy hh:mm".
Why does the date appear as a number?
Excel stores dates as serial numbers. Select the result cell and choose a date format from Home > Number Format.
Will the worksheet macro run in Excel for the web?
No. Excel for the web does not run VBA macros. Open the macro-enabled workbook in desktop Excel to use the worksheet change event.




