Function Problems

Insert and Update a Date When an Excel Cell Changes

Jason MillerJason Miller Dec 2, 2026 869 views

Question details

The user wants to insert a date in one Excel cell when another cell is populated or modified.

Insert and Update a Date When an Excel Cell Changes
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.
Before you start

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.

Solution 1Recommended

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.

1
Enter the formula

Select B1 and enter =IF(A1<>"",TODAY(),""). Replace A1 with the cell you want to check.

2
Format the result

Select B1, open Home > Number Format, and choose a date format if the result appears as a number.

3
Test the cell

Enter a value in A1. B1 displays the current date; clearing A1 leaves B1 blank.

Show Today's Date When a Cell Is Populated
This is not a permanent timestamp: TODAY updates when Excel recalculates, so the displayed date can change on a later day even if A1 has not been edited.
Use WPS Spreadsheets

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. 1. Open the workbook: Open WPS Spreadsheets and select Open to choose your workbook.
  2. 2. Enter the formula: Select B1 and enter =IF(A1<>"",TODAY(),""). Change A1 to your reference cell if needed.
  3. 3. Apply a date format: Select B1 and use the number format controls on the Home tab to choose a date format.
  4. 4. Check the result: Enter a value in A1 and confirm that B1 displays today's date.
Display the current date only when the reference cell is populatedOpen and edit Microsoft Excel XLSX workbooksUse a familiar spreadsheet interfaceWork with a free, lightweight office suite
microsoft office alternative - wps office

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.