Sub topic 8
Restoring earlier versions with Version History
This chapter assumes you can already save a workbook to OneDrive or SharePoint, share it, and turn on AutoSave. If someone overwrote a formula, deleted a sheet, or pasted over a table, Version History lets you recover the earlier state of the whole file. By the end you will know where versions come from, how to open and restore one, and what the feature cannot do.
What Version History is
Version History is a list of saved snapshots of one file. OneDrive and SharePoint store it, not Excel. Each entry records a date, a time, and the person whose edits produced that snapshot. Because the service keeps the list, it follows the file. It works the same whether you open the workbook in desktop Excel, in Excel for the web, or from the document library.
Two conditions apply:
- The file must be stored in OneDrive or SharePoint. A workbook on a local drive has no cloud version list.
- You need edit permission to restore a version. People with view-only links can sometimes browse versions, but they cannot replace the current file.
Where versions come from
You do not create versions by hand. The service creates them as the file changes.
| Situation | How versions are created |
|---|---|
| AutoSave on | The service saves a new version periodically while people edit. Several small edits are grouped into one version. |
| AutoSave off | A new version is created each time someone selects Save. |
| Several co-authors editing | Edits merge into the same running session. A version may contain work from more than one person. |
| File closed by everyone | The last edits are committed as a version when the session ends. |
The exact interval between versions is controlled by the service and can change. Do not expect one version per keystroke or per cell. Expect a snapshot every few minutes of active editing, at best. If you need a guaranteed restore point, make one on purpose by saving a named copy (see the section on safer habits below).
Opening the version list
In desktop Excel:
- Open the workbook from OneDrive or SharePoint.
- Select File, then Info, then Version History. You can also select the file name in the title bar and choose Version History.
- A pane opens on the right. Versions are listed newest first, each with a timestamp and an author name.
In Excel for the web, select File, then Info, then Version History. A similar pane appears.
In a document library, select the file's ... menu and choose Version history. This view is a table with columns for version number, modified time, who modified it, and size. It also offers Restore and Delete options for each entry.
Reading a version before you restore it
Select any version in the pane. Excel opens it in a separate window as a read-only copy, with a bar at the top that tells you it is an older version. The window title shows which version you are looking at. Your current workbook stays open in its own window.
Use this copy to check your guess before changing anything. Look at the cells, sheets, and formulas you suspect were damaged. Scroll through the sheets, because a version may differ in places you did not expect. Step through several versions if you are not sure when the problem started.
Because the older copy is a real workbook window, you can copy a range from it and paste it into the current file. This often beats a full restore. It lets you recover one table without losing other people's good work from the last hour.
Restoring a version
When you find the right snapshot, choose Restore in the bar at the top of the version window. Excel asks you to confirm. After you confirm, that snapshot becomes the current version of the file.
The restore does not erase anything. The version that was current before the restore is kept in the list as its own entry, so you can undo a restore by restoring the newer version. Version numbers keep increasing. They do not go back to the number you restored.
flowchart TD
A[Something went wrong in the workbook] --> B[Open Version History]
B --> C[Select a version to open a read-only copy]
C --> D{Does it contain the data you need?}
D -- No --> E[Try an older or newer version]
E --> C
D -- Yes, only part of it --> F[Copy the range into the current file]
D -- Yes, all of it --> G[Select Restore]
G --> H[Previous current version stays in the list]The diagram above is the order to follow. The diagram block below repeats the same flow in the format the platform renders.
Restoring while others are editing
A restore changes the whole file, so it affects every person who has it open. If co-authors are active, their screens are updated to the restored content once they sync, and Excel may ask them to reload. Edits that a co-author made after the snapshot you restored are no longer in the current version. They remain in the newer entries in the list, but nobody sees them unless someone reopens those entries.
Before a full restore in a busy workbook:
- Tell the other editors in a comment, in chat, or by email.
- Ask them to stop editing, or to finish and wait for the restore.
- Prefer copying a range from the old version over restoring the whole file whenever only a small part is damaged.
Checking that you can use it
Version History depends on the file being in the cloud. This macro checks both conditions and reports them. It reads Workbook.FullName, which begins with https:// for files stored in OneDrive or SharePoint, and Workbook.AutoSaveOn.
Sub CheckVersionHistoryReady()
Dim inCloud As Boolean
inCloud = (Left$(ActiveWorkbook.FullName, 8) = "https://")
If Not inCloud Then
MsgBox "This workbook is stored locally. Version History is not available."
ElseIf ActiveWorkbook.AutoSaveOn Then
MsgBox "Cloud file with AutoSave on. Versions are created as people edit."
Else
MsgBox "Cloud file with AutoSave off. A version is created each time you save."
End If
End SubRun it from the Visual Basic Editor with the workbook active. For a file that has never been saved, FullName is only the file name, so the macro reports it as local.
Limits and surprises
- Retention is finite. The service keeps a limited number of versions per file. The number depends on the library or plan, and administrators can change it. Old versions are removed when the limit is reached.
- Deleted versions are gone. If someone deletes entries in the library's version table, you cannot bring them back through Excel.
- Whole-file only. There is no way to restore a single sheet or cell directly. You can only restore the file or copy from an older one.
- Names can mislead. The author shown is the person whose session produced the snapshot. In a co-authored session, a version labeled with one name may include other people's edits.
- Size grows. Each retained version uses storage quota, which matters for large workbooks with many edits.
- Features outside the file. Version History restores the contents of the workbook. It does not undo changes to sharing links or permissions on the library.
Safer habits
Version History is a safety net, not a plan. Add these habits:
- Before a risky change, such as deleting columns or running a large paste, save a copy with a clear name like
Budget_2026-11-27_before-cleanup.xlsx. - Keep AutoSave on for shared files, so versions are created as people work.
- When you find an error, check Version History soon. The longer you wait, the more likely it is that the good snapshot has aged out.
- Use Show Changes first when you only need to know who changed a cell. Use Version History when you need the data back.
Exercise
A teammate overwrote a summary table in a shared workbook 20 minutes ago. Three other people have made good edits to other sheets since then. What is the safest way to recover the table, and why?
Show answer
Open Version History, open a snapshot from before the overwrite as a read-only copy, and confirm it has the correct table. Then copy the table from that window and paste it into the current workbook. A full Restore would also roll back the other three people's good edits made after that snapshot, so copying the range is safer. If you must use Restore, warn the editors first. The previous current version stays in the list, so the restore can be undone.
Exercise
You open a workbook stored on your local drive and cannot find a Version History entry that works. Name two things you could check.
Show answer
First, check whether the file is stored in OneDrive or SharePoint, because a local file has no cloud version list. Second, check whether AutoSave is on, since with it off, a version appears only when someone saves. Moving the file to OneDrive or SharePoint, or running the CheckVersionHistoryReady macro, confirms the state.