Excel guide · 5 min read
Excel undo not working: why Ctrl+Z fails and how to get your data back
Still not working on your sheet? Paste your cells and the formula into Cellwise Fix. The engine shows which cause it is on your data, then you get the fix, checked. Open Cellwise Fix
Sample data
Every result on this page was calculated from this sheet by the same spreadsheet engine the Cellwise app uses.
| Row | A | B | C | D |
|---|---|---|---|---|
| 1 | Product | Price (9:00 version) | Price (now) | Changed? |
| 2 | Notebook A5 | 3.5 | 3.5 | |
| 3 | Gel pen, blue | 1.2 | 1.25 | Changed |
| 4 | Stapler | 8.9 | 8.9 | |
| 5 | Sticky notes | 2.4 | 24 | Changed |
| 6 | Highlighter set | 4.75 | 4.75 | |
| 7 | Paper clips | 1.1 | 1.1 | |
| 8 | Desk tray | 12.5 | 12.5 | |
| 9 | Scissors | 5.2 | 0 | Changed |
Quick checks
Look at the Undo button first (on the Quick Access Toolbar, or at the left end of the Home tab in newer versions of Microsoft 365). Greyed out means the undo list is empty. Click the small arrow next to it to see what's on the list; you can undo several steps at once by picking one further down.
- Greyed out right after clicking a button or running a macro? The macro cleared the list (cause 2).
- Greyed out after every edit in one particular workbook? An event macro or add-in is clearing it (cause 2).
- It undid only part of what you typed? You were still editing the cell (cause 1).
- You deleted a sheet? That can't be undone (cause 3).
- The change was too long ago, or the file was closed since? Go to Version History (cause 6).
- Ctrl+Z does nothing but the Undo button works? The shortcut isn't reaching Excel: see keyboard shortcuts not working.
1. Ctrl+Z while you're still editing a cell
While the cursor is inside a cell or the formula bar, Ctrl+Z undoes your typing inside that cell, a bit at a time, not the last change to the sheet. Press Esc to cancel the whole edit and leave the cell as it was. Once you've pressed Enter, Ctrl+Z undoes the entry in one step.
2. A macro ran and cleared the undo list
When a VBA macro changes the workbook, Excel empties the undo list, and the macro's own changes can't be undone either. That's why undo is greyed out straight after clicking a macro button. Save a copy, or check that Version History is on, before running a macro you don't know.
If undo is greyed out after every single edit in one workbook, the file (usually an .xlsm) probably has an event macro, such as code that runs whenever a cell changes and writes a timestamp or reformats something. Each run clears the list. Add-ins can do the same in every workbook. To test, start Excel in Safe Mode (hold Ctrl while opening Excel, or run excel /safe), which loads without add-ins; if undo works there, turn add-ins off one at a time under File > Options > Add-ins.
3. Some actions can't be undone
Deleting a worksheet is permanent: Excel warns that it will permanently delete the sheet, and Ctrl+Z won't bring it back. If you delete the wrong one, close without saving (if the file isn't on AutoSave) or restore an earlier version.
Closing a workbook clears its undo list, so changes from before you last closed the file can't be undone. Saving doesn't clear the list in current versions of Excel, which is why undo still works after AutoSave has saved your changes.
4. The undo list holds only 100 actions
Excel for Windows keeps the last 100 actions by default. After a long session of small edits, the change you want may have dropped off the end. Microsoft documents a registry setting (UndoHistory) to change the number, but Microsoft warns that more levels need more memory and slow Excel down, so change it with caution. For a big mistake from an hour ago, Version History is the better tool.
5. Co-authoring and shared files
When several people edit a file on OneDrive or SharePoint at the same time, Ctrl+Z undoes your own changes, not other people's. If someone else has since edited the same cells, your earlier change may no longer be undoable. To reverse another person's change, use Version History, or ask them to undo it on their side.
6. Get older data back with Version History
For files saved to OneDrive or SharePoint, go to File > Info > Version History (or click the file name at the top of the window and choose Version History). Open an earlier version, check it's the one you want, and either restore it or copy the values you need back into the current file. Restoring replaces everything changed since, so copying is often safer.
To see which values changed, paste the old version's column next to the current one and compare them. Here the 9:00 version's prices are in B and the current prices in C; FILTER lists the products where they differ, which catches the 24 typed instead of 2.40 and the price wiped to 0.
For files on your own computer that were never saved, see recover an unsaved Excel file.
Result: spills 3 rows × 1 column
| Gel pen, blue |
| Sticky notes |
| Scissors |
Gel pen, blue; Sticky notes; Scissors: the three products whose price differs from the 9:00 version.
Can I see the old and new value side by side?
Stack the columns with HSTACK inside FILTER (Excel 365), so each changed row shows the product, the old price and the new price.
Result: spills 3 rows × 3 columns
| Gel pen, blue | 1.2 | 1.25 |
| Sticky notes | 2.4 | 24 |
| Scissors | 5.2 | 0 |
Three rows: Gel pen 1.2 to 1.25, Sticky notes 2.4 to 24, Scissors 5.2 to 0.
Common mistakes
Running an unknown macro on the only copy
Macros clear the undo list. Save a copy first, or make sure the file is on OneDrive or SharePoint so Version History has an earlier version.
Pressing Ctrl+Z repeatedly while still typing in a cell
Press Esc to cancel the edit, then Ctrl+Z to undo earlier changes.
Restoring an old version over a day of other people's work
Open the old version, copy only the values you need, and compare columns with FILTER before pasting.
Deleting a sheet to "tidy up" before checking it
Sheet deletion can't be undone. Hide the sheet first and delete it once you're sure.
FAQ
Why is undo greyed out in Excel?
The undo list is empty. That happens after a VBA macro runs, after you reopen the file, or in a workbook whose event macros or add-ins clear the list after every change.
How many times can you undo in Excel?
Excel for Windows keeps 100 actions by default. Microsoft documents a registry setting to change it, but warns that more levels use more memory and can slow Excel down.
Can you undo after saving in Excel?
Yes, in current versions saving doesn't clear the undo list. Closing the workbook does, so after reopening use Version History instead.
How do I undo a deleted sheet in Excel?
You can't with Ctrl+Z. Close without saving if you can, or restore an earlier version from File > Info > Version History and copy the sheet back.
Functions used
Related guides
- Excel keyboard shortcuts not working: causes and fixes
- How to recover an unsaved Excel file
- How to enable macros in Excel
- Excel AutoSave greyed out or not working: why and how to fix it
- How to calculate standard error in Excel
- Why is Excel showing hashtags (#####) in a cell? Causes and fixes
Updated