Sub topic 10
Recovering with Undo and Redo
This chapter assumes you can open a workbook, select cells, and type an entry and commit it with Enter. Undo and Redo let you reverse mistakes in entering and editing data, and they have limits you should know before you rely on them.
What Undo and Redo do
Undo reverses your most recent action. Redo reapplies an action you just undid. Excel keeps a list of recent actions in memory. Each Undo steps back one action, and each Redo steps forward one.
| Command | Keyboard | Quick Access Toolbar |
|---|---|---|
| Undo | Ctrl+Z | Curved arrow pointing left |
| Redo | Ctrl+Y (or F4 in many cases) | Curved arrow pointing right |
The arrow next to the Undo button opens a list of recent actions. Click an item in that list to undo it and every action after it in one step. You cannot skip an action in the middle of the list.
Undoing an entry
Undo works at the level of a committed action. A committed entry is one you finished with Enter, Tab, or a click on another cell.
- Type
Totalin A1 and press Enter. - Type
Totalsin A1 and press Enter. - Press Ctrl+Z. A1 shows
Totalagain. - Press Ctrl+Z again. A1 is empty.
- Press Ctrl+Y. A1 shows
Totalagain.
While you are still typing in a cell, Ctrl+Z works differently. It undoes typing inside the cell, not a workbook action. Press Esc instead to cancel the whole uncommitted entry and keep the old contents.
Limits to know
- A new action clears Redo. If you undo three steps and then type something, the three undone steps are gone and Redo is unavailable.
- Saving does not clear Undo. You can usually undo after saving, as long as the workbook stays open.
- Closing the workbook clears the history. Reopening the file starts with an empty list.
- Some actions cannot be undone. Running a macro usually clears the Undo list. Some other actions, such as saving over a file or deleting a worksheet, cannot be reversed with Undo.
- The history is limited. Excel keeps a fixed number of steps, 100 by default, so very old actions cannot be recovered.
Treat Undo as a short-term safety net, not a backup. Before a large change such as a Find and Replace across many cells, save a copy of the file.
Common errors
- Pressing Ctrl+Z while editing in a cell and expecting a full undo. It only reverses typing in that cell. Commit or cancel the entry first.
- Undoing too far. Use Ctrl+Y right away to step forward again, before you make another change.
- Expecting Undo to restore data after a macro. The history is cleared, so work from a saved copy.
Exercise
You type 10 in B2 and press Enter. You type 20 in B2 and press Enter. You press Ctrl+Z twice, then type 30 in B3 and press Enter. What does Ctrl+Y do now, and why?
Show answer
Ctrl+Y does nothing. Typing 30 in B3 was a new action, so it cleared the Redo list. The two undone entries in B2 can no longer be redone.
Exercise
You are typing a long entry in a cell and realize it is wrong before pressing Enter. Which key discards it and keeps the previous contents, and why is it better than Ctrl+Z here?
Show answer
Esc. It cancels the whole uncommitted entry at once and restores what the cell held before. Ctrl+Z at that stage only reverses typing step by step inside the cell.