Sub topic 8
Restoring earlier versions with Version History
Version History lets you open, compare, and restore earlier copies of a workbook. This chapter assumes you already saved the workbook to OneDrive or SharePoint, turned on AutoSave, and can co-author with others. It does not cover Show Changes, which is a separate review tool.
How Version History works
When a workbook lives in OneDrive or SharePoint, the service keeps earlier copies of the file as it changes. With AutoSave on, Excel saves edits continuously, and the service groups them into versions. You do not create versions by hand. The number of versions kept and how long they stay depends on your OneDrive or SharePoint settings, so an old version may no longer be available.
Version History is the safety net for AutoSave. AutoSave writes every edit right away, so a mistake is saved too. Without Version History, you would have no way back.
Open Version History
- Open the workbook from OneDrive or SharePoint.
- Select the file name in the title bar.
- Choose Version History.
- A pane opens on the side and lists versions with the date, time, and the name of the person who saved each one.
You can also open the file's location in OneDrive or SharePoint, select the file's ... menu, and choose Version history.
Look at a version before you restore it
Select a version in the pane. Excel opens that version in a separate window, and your current file stays untouched. Check that it holds the data you want. You can copy cells from the old version and paste them into the current workbook. This is the safest option when only a few cells or one sheet went wrong.
Restore a version
If the whole workbook should go back, open the older version and choose Restore. Excel replaces the current content with that version. Your newer content is not deleted. The service records the restore as a new version, so you can go back again if you chose wrong.
| Goal | Best action |
|---|---|
| Undo a mistake you made a moment ago | Press Ctrl+Z |
| Recover a few cells or one sheet | Open the old version and copy what you need |
| Roll back the entire workbook | Restore that version |
| Keep both the old and new copies | Use **Save a Copy** from the old version |
Check AutoSave from a macro
If you rely on Version History, confirm AutoSave is on. This macro reads the Workbook.AutoSaveOn property and reports the state of the active workbook.
Sub ReportAutoSaveState()
If ActiveWorkbook.AutoSaveOn Then
MsgBox "AutoSave is on. Edits are saved to the cloud automatically."
Else
MsgBox "AutoSave is off. Turn it on to co-author in real time."
End If
End SubCommon errors
- Version History is missing or grayed out. The file is probably stored on your computer, not in OneDrive or SharePoint. Move it to the cloud first.
- An expected version is not listed. The version limit or retention setting may have removed it. Ask your administrator to check the library settings.
- You restored the wrong version. Open Version History again. The restore appears as a new entry, and the version you replaced is still in the list.
- Many versions with the same person's name. AutoSave groups edits by time, so one long session can produce several entries.
Exercise
A colleague overwrote an entire sheet with wrong numbers an hour ago, and three other people have edited other sheets since then. What is the safest way to fix it?
Show answer
Open Version History, open the version from before the mistake in its own window, and copy the original sheet content into the current workbook. A full restore would also discard the other people's later edits, so reserve it for cases where the whole workbook must roll back.
Exercise
You restored an old version and then realized it was the wrong one. How do you recover?
Show answer
Open Version History again. The restore was saved as a new version, so the version you replaced is still listed. Open it and restore it.