To find when a Google Sheets file was last updated, open it and choose File > Version history > See version history; the history panel shows saved versions and when they were made. If you need a timestamp inside the sheet that updates whenever someone edits a row, Google Sheets has no built-in last-edited cell function, but a small Apps Script can record one.
What “last updated” can mean
People use “last updated” to mean several different things: the time the whole spreadsheet file was last changed, the time a particular cell was edited, or the time a particular row of data was changed. These are not interchangeable. Google Sheets provides a file-level version history and a cell-level edit history, but it does not automatically place a permanent edit timestamp beside every value.
A file-level timestamp is useful when you are checking whether a report, schedule, or shared tracker has been touched recently. A cell-level history is more suitable when you need to investigate one specific value. A row timestamp, by contrast, is a workflow feature you must set up, typically with Apps Script. Decide which meaning you need before choosing a method; otherwise, it is easy to mistake a live clock for a record of an edit.
Find the file’s last edit in version history
In a desktop browser, open the spreadsheet and select File > Version history > See version history. A panel opens on the right with saved versions, dates, times, and the names of editors where available. Select a version to inspect the spreadsheet as it appeared at that point. The newest entry is the latest version shown in the history, which is the practical place to check for the file’s most recent recorded changes.
- Open the correct spreadsheet, checking its title if you have several similar files.
- Choose File > Version history > See version history.
- Look at the newest entry in the panel and select it if you want to inspect its contents.
- Close the panel when you have finished reviewing the history.
Google Drive may also show a file’s modification information in its details, but version history is more useful when you want context about spreadsheet changes. The exact wording or placement of interface controls can change over time, so the File menu is a dependable route to the history feature. You need access to the file to view its contents; what you can do with versions may depend on your permissions.
Compare versions and restore an earlier one
Version history is not merely a date display. Selecting an older version lets you review what the spreadsheet contained at that point and can help explain why a value, formula, or layout changed. When several people edit a file, the history can also identify the editor associated with a saved version. This can be useful for resolving a disagreement about when a change occurred, though it is not a substitute for a formal audit system.
If you need to return the file to an earlier state, select the relevant version and use the restore option shown in the history panel. Restoring affects the spreadsheet’s current contents, so check the selected version carefully first. If you only need to preserve an old state for reference, consider making a copy rather than replacing the current working version. Version history itself is usually the safer first step: review the past version before deciding whether to restore anything.
You can also name important versions, such as “Before monthly import” or “Approved budget.” Named versions make useful milestones easier to locate than a long list of automatic saves. They do not create a cell-by-cell timestamp column; they are labels for points in the file’s history.
Check the edit history for one cell
For a specific cell, right-click it and choose Show edit history. This displays previous edits to that cell, including information about who changed it and when, when that information is available. It is often faster than scanning the full file history if you are investigating one number or text entry.
Cell edit history has limits. It is focused on edits to the selected cell, not every structural or visual change in the spreadsheet. For example, formatting changes, inserted or deleted rows and columns, and changes that appear because a formula recalculates may not be represented as ordinary edits to that cell. A cell that has been removed may not be available to right-click at all. Use the broader version history when the question concerns the overall state of the file.
Why a formula is not a last-edited timestamp
Google Sheets does not provide a standard worksheet function that means “return the time this cell was last edited.” The NOW function returns the current date and time when the spreadsheet recalculates; it is not a permanent record of the edit that caused a change. Depending on calculation settings and activity in the file, its displayed value can change later. That makes it suitable for showing a current time, but not for maintaining a reliable audit trail.
A common workaround is to place a current-time formula in a timestamp column and try to make it refer to the edited row. This can lead to circular references or timestamps that refresh when the sheet recalculates rather than when a person changes the data. If the timestamp must remain fixed, use a script or enter a date and time manually. For lightweight recordkeeping, manual entry may be enough; for repeated updates across many rows, automation is less error-prone.
Automatically timestamp edited rows with Apps Script
A bound Apps Script can write the current date and time into a chosen column when someone edits specified data columns. For example, the script below watches columns A and B on a tab named Tasks and writes a timestamp in column C for every row touched. It also handles a multirow paste by stamping each affected row.
- In the spreadsheet, choose Extensions > Apps Script.
- Replace the starter code with the example below, changing the tab name or column numbers if your layout differs.
- Save the project, then return to the sheet and edit a cell in column A or B on the Tasks tab.
- Format column C using Format > Number > Date time if the timestamp is not displayed in the format you want.
function onEdit(e) {
const sheet = e.range.getSheet();
if (sheet.getName() !== 'Tasks') return;
const firstColumn = e.range.getColumn();
const lastColumn = e.range.getLastColumn();
const touchesData = firstColumn <= 2 && lastColumn >= 1;
if (!touchesData) return;
const firstRow = e.range.getRow();
const lastRow = e.range.getLastRow();
for (let row = Math.max(2, firstRow); row <= lastRow; row++) {
sheet.getRange(row, 3).setValue(new Date());
}
}
This example assumes row 1 contains headers, data begins in row 2, and column C is reserved for timestamps. It updates the timestamp whenever an edit range overlaps columns A or B, including a paste that covers multiple rows. If your data should trigger a timestamp only when both fields are changed, or only when a required field is nonblank, adjust the conditions to match that rule. Test the script on a copy or a few sample rows before relying on it in a live tracker.
Understand script and timestamp limitations
The simple onEdit(e) trigger responds to a person editing the spreadsheet in the interface. It does not run every time another script or an API integration changes a value, and formula recalculation is not the same as a user edit. If a connected service imports data, this example may leave the timestamp unchanged. In that case, the integration or a separately configured automation needs to write the timestamp as part of its own update process.
The sample stamps a row whenever an edit overlaps either watched column; it does not record the previous value, the editor’s identity, or a detailed change log. It also replaces the earlier timestamp rather than preserving a history of all edits. These are intentional trade-offs for a simple “last touched” field. For regulated or high-accountability records, check whether your organization’s retention and audit requirements call for a more controlled logging system.
Choose the timestamp column carefully. If users can type into it, they may overwrite the script’s value. Protecting that range can reduce accidental changes, but confirm that the people who need to edit the sheet can still do their work. If the sheet has several tabs, add the appropriate tab-name condition for each one or use a deliberate naming convention; otherwise, the timestamp may be written on the wrong tab or not written at all.
Time zones and display formats
A timestamp includes a date and a time, but the way it appears depends on formatting and time-zone settings. If a date looks one day early or late, or the time differs from what a collaborator expects, check the spreadsheet’s time zone in File > Settings. The display format can be changed independently with Format > Number > Date time or another date and time format.
For example, a stored timestamp may represent the same moment but display as 3:30 PM for one time zone and 12:30 PM for another. Agree on a time zone when a team uses timestamps to coordinate deadlines or compare edits. Avoid treating a date-only display as proof that the time was not recorded: the cell may simply be formatted to hide the time portion. Conversely, changing the display format does not change when the edit happened.
Which method should you use?
- Use version history when you want to know when the spreadsheet file changed or compare the overall contents of earlier versions.
- Use Show edit history when you need to inspect the edit record for one existing cell.
- Use an Apps Script timestamp when a workflow needs a visible, fixed “last touched” time beside each row.
- Use manual entry when edits are infrequent and a person can reliably record the date and time.
These approaches answer different questions, so using more than one can make sense. A shared task tracker might use a script to show when each task row was last changed, while a manager checks version history before restoring a file-wide mistake. If you need to know exactly who changed every field and preserve each earlier value, a single timestamp column is not enough; use version history or a purpose-built change log as well.
Frequently Asked Questions
Can I see when a Google Sheets file was last edited?
Yes. Open File > Version history > See version history and check the newest entry. The panel provides version dates and times, with editor information where available.
Can Google Sheets put the last edit time in a cell automatically?
Not with a built-in last-edit worksheet function. You can use Apps Script to write a fixed timestamp when a user edits specified cells, or enter the timestamp manually.
Does NOW show when a cell was last changed?
No. NOW gives a recalculating current date and time, not a permanent record of the cell’s last edit. Use version history, cell edit history, or a script-written timestamp for edit records.
Can I see who edited a particular cell?
Right-click the cell and choose Show edit history. It can show previous edits and editor details when available, but it does not capture every kind of spreadsheet change.
Why is my Apps Script timestamp not updating?
Check that the edit was made on the watched tab and in one of the watched columns, and that the timestamp column is correct. A simple onEdit trigger does not run for changes made by another script, an API, or formula recalculation.
Related
- US Number Format in Excel: Dates and Numbers
- Update Number Format in Excel: How to Change Formats
- Unmerge Shortcut in Excel: Windows Keys and Common Fixes
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- How to Count in Excel: COUNT, COUNTA, and MoreTo count numeric values in a range, enter =COUNT(A2:A10) in an empty cell, assuming the values you want…
- Excel Keyboard Shortcut to Split a CellIn Excel for Microsoft 365 on Windows, press Alt, H, M, U to unmerge a selected merged cell.…
- How to Sum in Excel Without Hidden Rows Using SUBTOTALTo total only visible values in Excel for Microsoft 365 on Windows, use SUBTOTAL with function number 109.…
- Google Sheets: Duplicate a Sheet Multiple TimesYes. In Google Sheets, right-click a sheet tab and choose Duplicate to make one copy; repeat the command…
- Location Heat Map in Excel: Create One Step by StepYes. In Excel for Microsoft 365 on Windows, you can create a location heat map with 3D Maps:…
- How to Delete Borders in Excel Without Clearing DataTo delete borders in Excel without removing cell contents, select the cells, then choose Home > Borders ▼…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.