If the workbook is still open, press Ctrl+Z on Windows (Command+Z on Mac) to undo your most recent change; saving does not normally clear Excel’s Undo history. If you have closed and reopened the file, use Version History or a backup to retrieve an earlier copy, because the ordinary Undo command cannot reach changes from a previous session. First, avoid making more edits until you know which recovery option is available.
This guide is for Microsoft Excel for Microsoft 365 on Windows. The same basic Undo shortcut works on Mac and Excel for the web, although some menu locations differ. The right fix depends mainly on whether the workbook is still open and whether it is stored in OneDrive, SharePoint, or only on your device.
What You’ll Need
- The workbook, and ideally the same Excel session in which the unwanted change was made.
- If the workbook has been closed, access to its OneDrive or SharePoint location, or a computer backup such as File History. A previous version is available only if versioning or backup was enabled and a suitable copy exists.
- A safe place to save a copy of the current workbook before restoring an older version. This helps preserve any later work you still need.
Step-by-Step
-
Check whether the workbook is still open. Look at Excel’s open windows or the taskbar. If the workbook remains open, do not close it or quit Excel yet. Saving the file does not usually remove the current session’s Undo history, so you may be able to reverse the change directly. If you already closed it, skip to the version recovery steps below.
-
Undo one change at a time. Click a cell or area of the worksheet that is not being edited in the formula bar, then press Ctrl+Z. On Mac, press Command+Z. Alternatively, select the Undo button on the Quick Access Toolbar, usually shown as a curved left arrow. Check the worksheet after each undo so you can stop as soon as the unwanted edit is reversed.
For example, if you replaced a formula in cell D12 with a number and then saved, press Ctrl+Z once while the workbook is still open. If that was the last action, Excel should restore the formula. If you performed other actions afterward, the first undo reverses the most recent one instead, so continue carefully and inspect the result each time.
-
Use the Undo list when several actions need review. Select the small arrow beside the Undo button on the Quick Access Toolbar to view recent actions, if the list is available. The list can help identify how far back the unwanted change occurred. Selecting an earlier action generally undoes that action and the actions listed above it as well; it is not a way to reverse only one old action while preserving everything done later. Save a separate copy first if those later changes matter.
-
Save a safety copy before trying a larger rollback. If Undo would remove several useful edits, preserve the current state before changing versions. In desktop Excel, use File > Save As and save a copy with a distinct name, such as Workbook-current-copy.xlsx. For a OneDrive or SharePoint workbook, use the available Save a Copy option or download a copy. Confirm that the copy is saved somewhere you can find, then work on the original or a separate recovery copy.
-
Check Version History for a cloud workbook. In Excel for Microsoft 365 on Windows, open the workbook and select File > Info > Version History. In Excel for the web, use File > Version History. Find an entry from before the unwanted change and open it to inspect its date and contents. Version History is generally available for files saved in OneDrive or SharePoint, but its entries depend on the account, storage location, and versioning settings.
If the earlier version contains what you need, avoid immediately replacing the current file if you are unsure. Copy the needed worksheet, cells, or formulas from the older version into your safety copy when practical. If you want to roll back the whole workbook, use Restore in the version history interface and read any confirmation carefully. Restoration can replace the current state, which is why a separate copy is important.
-
Look for a local backup if there is no cloud history. In Windows File Explorer, right-click the workbook and choose Properties > Previous Versions. This may show available copies if File History, backup software, or another supported backup feature was set up before the mistake. Prefer opening or copying a listed version rather than restoring over the current file. If no entries appear, Windows has no usable previous version to offer for that file.
On Mac, check Time Machine if it was enabled and the workbook was included in a backup. Browse to the folder containing the workbook, open Time Machine, and locate a date before the unwanted change. Restore to a separate location when possible, then compare the recovered copy with the current file.
-
Check the recovered content before continuing. Compare the affected cells, formulas, formatting, and worksheet names with the version you intended to keep. If you restored an entire workbook, confirm that other recent edits or new sheets have not disappeared. Save the verified result under a clear name, and retain the safety copy until you are certain the recovery is complete.
Common Mistakes
Closing Excel before trying Undo. The ordinary Undo stack belongs to the open editing session. After you close the workbook or quit Excel, reopening it does not normally bring that session’s Undo history back. Saving alone is different: if you saved but kept the workbook open, Ctrl+Z may still work.
Pressing Undo repeatedly without checking. Each press reverses another action, not necessarily another part of the mistake. You may undo formatting, pasted data, or other useful work along the way. Pause after each step and inspect the sheet.
Restoring a whole older version to fix one cell. An older workbook may also be missing legitimate changes made since that version. When possible, open the old version and copy only the needed cell or sheet into a separate current copy.
Assuming AutoSave is a backup or an Undo feature. AutoSave can save ongoing changes to supported cloud files, but it does not provide a general command to undo a change after the workbook is closed. Use Version History or an independent backup for recovery.
Overwriting the only copy. Restoring a previous version or copying recovered data into the current file can make other information harder to retrieve. Keep a separate copy before a full rollback.
Tips
When Undo is available, it is usually the quickest and least disruptive way to reverse a recent edit. If only one cell is affected and you know its prior value or formula, entering that value again may be safer than undoing a long chain of actions. Check nearby formulas and dependent results before saving.
For important workbooks, keep them in OneDrive or SharePoint when appropriate and confirm that Version History is available. Cloud storage and version history are not a substitute for a deliberate backup, so maintain a separate copy for high-value files. Give copies dates or clear labels so you can tell which is current.
If you regularly need to compare versions, open the older copy alongside the current workbook instead of restoring immediately. This makes it easier to copy a single worksheet or compare values without discarding later changes. For a small correction, copy only the required cells and check formulas, references, and formatting after pasting.
Be especially cautious after running a macro or using an add-in. Some operations cannot be reversed with Ctrl+Z, and running VBA clears Excel’s standard Undo history. Before a macro or major data operation, save a separate copy of the workbook. Do not assume a saved file can always be rolled back unless you have confirmed that a suitable version or backup exists.
Troubleshooting
Ctrl+Z does nothing, or the Undo button is unavailable. The action may not be undoable, the workbook may have been closed and reopened, or a macro or some add-in operation may have cleared the Undo history. Look for Version History or a backup instead. Also check that Excel is the active app and that you are not typing inside a cell; press Esc to leave cell editing, then try the shortcut again.
The wrong action was undone. Press Ctrl+Y on Windows or Command+Y on Mac to redo the last undone action, if Redo is available. Then inspect the Undo list and proceed more carefully. Redo is not guaranteed for every type of operation, so if the result is important, stop and make a copy before further changes.
Version History is missing. Confirm the file’s location and account. A workbook stored only on a local drive may not have Microsoft 365 cloud version history. A cloud file may also have no useful earlier entry if it was newly uploaded, versioning is unavailable, or the change occurred before the retained versions. Check the file’s cloud location, account access, and any organization settings, then look for a device or organizational backup.
Previous Versions shows no entries. This normally means Windows has no available backup copy for that file, not that Excel is hiding the Undo command. Check whether File History or backup software was enabled before the edit, and search any external drive or managed company backup. Do not install recovery tools or save new files over the same drive if you are considering professional data recovery.
The restored copy is missing newer work. Keep both files. Open them separately and copy the missing sheets, rows, or formulas from the newer copy into the recovered one. Check links, named ranges, and formulas after combining content, then save the merged result under a new name. A restored version is a snapshot, not an automatic merge of every change.
Frequently Asked Questions
Can I undo in Excel after saving?
Usually, yes, if the workbook is still open in the same Excel session. Press Ctrl+Z on Windows or Command+Z on Mac. Saving by itself generally does not clear the Undo history.
Can I undo after closing and reopening the workbook?
Usually not with Ctrl+Z. The previous session’s Undo history is normally gone. Check Version History for a OneDrive or SharePoint file, or look for a backup or previous file version.
Does AutoSave let me undo a saved change?
No. AutoSave writes changes to a supported file as you work; it is not a separate undo history. If the workbook is still open, try Undo. If it is closed, look for Version History or a backup.
Can I recover just one cell from an earlier version?
Often. Open the earlier version, locate the cell, and copy its value or formula into a separate copy of the current workbook. Check references and formatting, since a formula copied to a different location may adjust its cell references.
Why did Excel clear the Undo history?
Closing the workbook ends the usual session history. Running VBA macros and some add-in or specialized operations can also clear it or make an action non-undoable. Save a copy before running a macro or performing a large operation.
Related
- How to Transpose Names in an Excel Column to a Row
- How to Transpose in Excel: Turn Rows Into Columns Easily
- Transpose in Excel Without Pasting: 3 Practical Methods
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 Create a Checklist Template in WordTo create a reusable checklist in Microsoft Word, add your task labels and checkbox controls, format the page,…
- Excel Shortcut to Select an Entire ColumnIn Excel for Microsoft 365 on Windows, press Ctrl+Spacebar to select the entire worksheet column containing the active…
- Schedule an Outlook Email to Send Every WeekOutlook’s built-in Schedule Send feature sends a message once; it does not repeat it every week. To send…
- Excel Insert Shortcut: Add Cells, Rows, and ColumnsIn Excel for Microsoft 365 on Windows, select the cells, row, or column where you want space, then…
- Highlight Duplicates in Google Sheets: Both MatchesTo highlight both the original and repeated values in Google Sheets, select the cells, open Format > Conditional…
- How to Check Double Spacing in WordTo check whether text is double-spaced in Word, place the cursor in a paragraph or select the paragraphs,…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.