How to Reverse an Action in Excel: Undo, Redo, and Restore
In this article
To reverse an action in Excel, press Ctrl+Z (Windows) or Command+Z (Mac). This undoes the most recent change. If you need to reapply an action you just undid, press Ctrl+Y (Windows) or Command+Shift+Z (Mac). For changes made in a previous session, you cannot undo them directly, but you can close the file without saving and reopen it to revert to the last saved version, or use version history if the file is stored on OneDrive or SharePoint. This guide covers these methods, plus common pitfalls and troubleshooting.
What You'll Need
- Microsoft Excel (any recent version) on Windows or Mac.
- For version history: a file saved to OneDrive or SharePoint (Microsoft 365 subscription required for some features).
- Keyboard with standard shortcuts (or access to the Quick Access Toolbar).
Step-by-Step
- Undo the last action: Press Ctrl+Z (Windows) or Command+Z (Mac). Each press undoes one action, up to the limit of Excel's undo stack (typically 100 actions). You can also click the Undo button (curved arrow) on the Quick Access Toolbar.
- Redo an undone action: Press Ctrl+Y (Windows) or Command+Shift+Z (Mac). Alternatively, click the Redo button (curved arrow pointing right) on the Quick Access Toolbar.
- Undo multiple actions at once: Click the drop-down arrow next to the Undo button on the Quick Access Toolbar. Select the actions you want to undo from the list (they are listed in reverse chronological order). Click to undo all selected actions.
- Revert to a previous saved version: If you need to undo changes made before the last save, close the file without saving (File > Close, then choose "Don't Save"). Reopen the file to see the last saved state. Note: This loses all changes since the last save.
- Use version history (OneDrive/SharePoint): Open the file in Excel for the web or desktop. Go to File > Info > Version History. Select a version from the list to open it. You can then copy content from the older version or restore it (if available). Labels may vary slightly by version and platform.
- Recover an unsaved file: If Excel crashes or you close without saving, go to File > Info > Manage Workbook > Recover Unsaved Workbooks. Select the file from the list and open it. Save it immediately to keep the changes.
Common Mistakes
- Assuming undo works after saving: Undo only affects actions in the current session. Once you save and close, you cannot undo those changes with Ctrl+Z.
- Exceeding the undo limit: Excel keeps a limited number of undo steps (often 100). If you need to reverse many actions, use version history or revert to a saved copy.
- Confusing undo and redo: Ctrl+Z undoes; Ctrl+Y redoes. Using Ctrl+Y after multiple undos may reapply actions in a different order than expected.
- Not saving before major changes: Always save a backup copy before making extensive edits, so you can revert if needed.
- Ignoring version history availability: Version history requires the file to be saved on OneDrive or SharePoint. Local files do not have this feature.
Tips
- Use the Quick Access Toolbar drop-down for selective undo of multiple steps.
- Enable AutoSave (File > Options > Save) when working on OneDrive files to automatically save changes and enable version history.
- For critical work, save a copy (File > Save As) before making risky changes.
- Keyboard shortcuts work across most Excel versions; on Mac, use Command instead of Ctrl.
- If you accidentally close without saving, check the Recover Unsaved Workbooks option promptly.
Troubleshooting
- Ctrl+Z does nothing: Ensure the Excel window is active and not in cell edit mode. Press Esc to exit edit mode, then try again. If the undo stack is empty (e.g., after saving), you cannot undo further.
- Undo button greyed out: There are no actions to undo, or the workbook is protected. Check if sheet protection is enabled (Review > Unprotect Sheet).
- Version history not available: The file may be stored locally or on a network drive without versioning. Save to OneDrive or SharePoint to enable it. Also, version history may require a Microsoft 365 subscription.
- Recover Unsaved Workbooks shows no files: Excel may not have auto-recovered the file. Check the default AutoRecover file location (File > Options > Save) and look for .xlsb files.
- Undo affects wrong action: The undo stack records actions in order. If you undid multiple steps, use Redo (Ctrl+Y) to step forward, or use the drop-down to select specific actions.
Frequently Asked Questions
Can I undo a change after saving and closing the file?
No, Ctrl+Z only works within the current session. After saving and closing, you cannot undo changes. You can revert to a previous version if the file is on OneDrive or SharePoint, or restore from a backup.
How many actions can I undo in Excel?
Excel typically keeps the last 100 actions in the undo stack, but this can vary by version and available memory. For more, use version history or save backups.
What is the difference between Undo and Redo?
Undo reverses your last action; Redo reapplies an action you just undid. Use Ctrl+Z to undo and Ctrl+Y (Windows) or Command+Shift+Z (Mac) to redo.
Can I undo changes made by a macro?
No, Excel's undo feature does not track changes made by macros or VBA code. You must manually reverse those changes or restore from a backup.
Does version history work for local files?
No, version history is only available for files saved to OneDrive or SharePoint. For local files, use Save As to create manual backups.
How do I recover an unsaved workbook after a crash?
Go to File > Info > Manage Workbook > Recover Unsaved Workbooks. If Excel did not auto-recover, check the AutoRecover file location set in File > Options > Save.