Excel's Undo button (Ctrl+Z) stops working for a few predictable reasons: the action you just took cannot be undone, you are editing inside a cell, the workbook is protected or shared, or Excel's undo history was cleared by a save, a macro, or a refresh. The quickest fix is to press Esc to leave cell-edit mode, click Undo from the Quick Access Toolbar, and check whether the workbook is marked as shared or protected. Below is a step-by-step guide to diagnose and restore undo, plus what to do when it still will not come back.

What You'll Need

  • Excel for Windows or Mac (the steps are written for desktop Excel; the web version has a much smaller undo history and some actions cannot be undone at all)
  • Access to the workbook, and permission to unshare or unprotect it if those are the cause
  • A recent backup or a saved copy, in case you need to close without saving

Step-by-Step

  1. Press Esc first. If the cursor is blinking inside a cell, you are in edit mode and Ctrl+Z is undoing text inside that cell, not the last worksheet action. Press Esc to exit edit mode, then try Undo again.
  2. Use the toolbar button, not just the shortcut. Click the curved Undo arrow on the Quick Access Toolbar. If the button is greyed out, Excel has no undo history to replay. If it works but Ctrl+Z does not, another program may be capturing the shortcut (see Troubleshooting).
  3. Check the Undo drop-down list. Click the small arrow beside the Undo button. The list shows exactly which actions Excel can reverse. If your last action is not in the list, it is not undoable by design. Actions that cannot be undone include saving, closing, deleting or renaming a worksheet, most macro runs, some data refreshes, and changes made by add-ins.
  4. Look at the title bar. If it says Shared or [Shared], the workbook is in a shared-workbook mode that limits undo. Go to Review > Share Workbook (or the equivalent sharing option in your version; labels vary slightly by version and region) and turn sharing off, then reopen the file. Note that unsharing can affect other users, so coordinate first.
  5. Check for sheet or workbook protection. On the Review tab, look at Protect Sheet and Protect Workbook. If either is active, many edits are blocked or cannot be reversed. Unprotect them if you have the password, make your change, then re-protect.
  6. Confirm you are not in a grouped-sheet selection. If multiple sheets are selected (the tabs appear grouped), some edits behave unexpectedly. Right-click a tab and choose Ungroup Sheets, then retry.
  7. Test in a blank workbook. Press Ctrl+N and type something, then undo. If Undo works there, the problem is specific to the original file (sharing, protection, size, or corruption). If it fails in a blank workbook too, the problem is Excel or the keyboard shortcut itself.
  8. Restart Excel and, if needed, the computer. Close Excel fully, reopen the file, and try again. A restart clears stuck edit states and add-in conflicts.
  9. Disable add-ins temporarily. Go to File > Options > Add-ins, manage Excel Add-ins and COM Add-ins, and clear the checkboxes. Restart Excel and test Undo. Re-enable them one at a time to find the culprit.
  10. Repair Office if the problem persists. On Windows, go to Settings > Apps > Installed apps, find Microsoft 365 or Office, choose Modify, then Quick Repair. On Mac, use the Microsoft AutoUpdate tool or reinstall from the official source. Repair does not delete your files.

Common Mistakes

  • Pressing Ctrl+Z while still typing in a cell and assuming worksheet undo is broken. Press Esc first.
  • Expecting Undo to reverse a save, a macro, or a deleted worksheet. Those actions are not in the undo stack.
  • Working in a shared workbook and blaming Excel. Shared-workbook mode deliberately limits undo.
  • Using the web version of Excel and expecting desktop-level undo. The browser version has a shorter history and cannot undo some actions.
  • Closing the file without saving to "undo" a mistake, then losing other good changes. Save a copy first if you are unsure.

Tips

  • Keep the Quick Access Toolbar visible so you can see at a glance whether Undo is available (greyed out means no history).
  • Use the Undo drop-down to jump back several steps at once instead of pressing Ctrl+Z repeatedly.
  • For big or risky edits, save a copy first (File > Save As) so you have a fallback that does not depend on undo history.
  • If you use macros, note that most macro actions clear the undo stack. Run macros on a copy when you might need to reverse the result.
  • On Mac, check System Settings > Keyboard > Shortcuts to confirm Ctrl+Z or Cmd+Z has not been reassigned.

Troubleshooting

Undo is greyed out immediately after an edit. The action is probably not undoable (save, macro, refresh, worksheet deletion) or the workbook is shared or protected. Check the title bar and the Review tab first.

Ctrl+Z does nothing but the toolbar button works. Another application or a keyboard utility may be capturing the shortcut. Close background apps one at a time, or check your keyboard remapping software. On Mac, verify the menu shortcut under Excel > Preferences or System Settings.

Undo works in a new file but not the problem file. The file is likely shared, protected, very large, or slightly corrupted. Turn off sharing and protection, then try File > Save As to a new .xlsx file and test again. If it still fails, open the file in Excel's safe mode (hold Ctrl while launching Excel on Windows) to rule out add-ins.

Undo history disappears after a data refresh. Refreshing external data or running certain add-ins clears the undo stack. Do refreshes after you have finished manual edits, or work on a copy.

Nothing helps. Repair Office (Quick Repair first, then Online Repair if needed), and make sure you are on the latest update from the official source. If the workbook is business-critical and still misbehaving, open it in Excel for the web to compare behavior, and keep a saved backup before any further changes.

Frequently Asked Questions

Why is Excel's Undo button greyed out?

Either there is no undoable action in the history (for example, you just saved or ran a macro) or the workbook is shared or protected, which limits undo.

Can I undo a save in Excel?

No. Saving clears the undo history and is not itself undoable. Use File > Save As to keep a copy before risky changes, or rely on version history if your file is stored in OneDrive or SharePoint.

Does Excel for the web have the same undo as desktop Excel?

No. The web version has a shorter undo history and cannot reverse some actions that desktop Excel can. For full undo behavior, use the desktop app.

Why does Ctrl+Z undo my typing instead of my last cell change?

Because you are still in edit mode inside a cell. Press Esc to leave the cell, then press Ctrl+Z.

Can I increase the number of undo steps in Excel?

There is no user-facing setting to change the undo limit. The history depth is fixed by Excel and is cleared by saves, macros, and some refreshes.

Does unsharing a workbook restore undo?

Usually yes, once sharing is turned off and the file is reopened. Coordinate with other users first, because unsharing affects their access.