logo
search
Version History Issues

How to Track Previous Dates When Overwriting Cells in Excel

John WilsonJohn Wilson Sep 30, 2026 869 views

Question details

The user needs to track a history of dates, such as maintenance or cleaning dates, which are currently being overwritten in a single cell, making it difficult to measure frequency.

How to Track Previous Dates When Overwriting Cells in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
Managing a maintenance or cleaning log where continually updating a single cell (e.g., D24) replaces the previous date.
Observed behavior
Overwriting the cell permanently deletes the previous date, making it impossible to retain a historical record or analyze cleaning frequency.
Before you start

Decide whether you prefer a simple manual tracking method using tables or an automated approach, and ensure you save a backup of your workbook before applying any VBA macros.

Solution 1Recommended

Create a Structured Data Logging Table

The most reliable way to track history is to append new rows for each event instead of overwriting a single cell.

Instead of keeping a static layout where data is continuously overwritten, shifting to a structured database format allows you to keep an infinite history of events.

1
Insert Headers

Create two column headers in a blank area of your sheet, such as 'Bin ID' and 'Cleaning Date'.

2
Format as Table

Select the headers and press Ctrl+T (or go to Insert > Table) to create a structured table.

3
Add New Entries

Whenever a bin is cleaned, add a new row to the bottom of the table with the corresponding ID and the current date, rather than changing an existing cell.

4
Filter and Analyze

Use the drop-down arrows on the table headers to filter by specific Bin IDs and view their complete historical timeline.

Create a Structured Data Logging Table
Best Practice: Using a table allows for easy sorting, filtering, and pivot table analysis without the need for complex formulas or macros.
Manage Spreadsheets Efficiently

Track Data History Seamlessly with WPS Spreadsheet

WPS Spreadsheet offers powerful table features, easy filtering, and full support for VBA macros, making it simple to track your historical data and maintenance logs efficiently.

  1. 1. Download and Install: Get WPS Office from the official website and launch WPS Spreadsheet.
  2. 2. Create Your Log Table: Set up columns for ID and Date, select them, and click Insert > Table to begin tracking.
  3. 3. Enable Macros (Optional): If using the VBA tracking approach, ensure you save your file in the .xlsm format to retain your Worksheet_Change scripts.
Create structured tables easily for robust historical data trackingFull compatibility with Microsoft Excel (.xlsx and .xlsm) formatsSupports VBA macros for automated cell trackingLightweight and completely free to download
microsoft office alternative - wps office

Frequently Asked Questions

Can I use formulas to save the previous value of a cell?

No, standard spreadsheet formulas cannot retain the previous value of a cell once it is overwritten. Formulas only calculate based on current data. You must either use a VBA macro or change your data entry method to use a continuous log table.

How do I calculate the days between cleaning dates in a log table?

In a structured table, you can sort by Bin ID and Date, then use a simple subtraction formula (e.g., =B3-B2) in an adjacent column to find the exact number of days between the current and previous dates.

Why is my VBA Worksheet_Change macro not triggering?

Ensure that macros are enabled in your security settings and that your code is placed in the specific Worksheet module rather than a standard module. Also, verify that event triggers haven't been disabled via a previous script using 'Application.EnableEvents = False'.