Press Ctrl + Z to undo your last action in Excel for Windows, and keep pressing it to step further back. Press Ctrl + Y to redo what you undid. On a Mac, Cmd + Z undoes.
To undo several steps at once, click the arrow beside the Undo button (on the Home tab or the Quick Access Toolbar, depending on your version) and pick how far back to go. Excel keeps the last 100 actions, and saving the file does not clear them.
When there is nothing left to redo, Ctrl + Y and F4 repeat your last action instead, such as a fill colour or an inserted row, on whatever is now selected. That is why Ctrl + Y can change cells you did not expect.
A macro that changes the workbook clears the undo list, so you cannot undo what it did or anything before it. Deleting a worksheet cannot be undone either. Save a copy before running a macro on data you care about.
Undo history does not survive closing the workbook. To get back an earlier state after that, use File → Info → Version History for files saved in OneDrive or SharePoint.
Latest Video Tutorial – 10 Excel Keyboard Shortcuts (Probably YOU are NOT Using)
Undo is used to reverse the last actions you do in Excel. By default, Excel stores the last 100 actions, so using the Undo option, you can reverse your actions up to 100 times and restore things to how they were. You can also undo actions after you have saved the file, as long as the workbook is still open.
Redo does the opposite of Undo. Let’s assume you have undone some of your last actions, but now you want to bring some of them back. In that case, you can use the Redo option, which restores the actions you have undone.
Undo Shortcut in Excel
Undo in Windows
Ctrl + Z
Undo in Mac
Cmd + Z
Redo Shortcut in Excel
Redo in Windows
Ctrl + Y
Redo in Mac
Cmd + Shift + Z
On a Mac, Command + Y also works for Redo.
Steps to Use Undo – Redo Using Keyboard Shortcut
- Just press the Ctrl + Z keyboard shortcut once if you want to undo only the last step, or press it as many times as the number of steps you want to reverse.
- To restore the undone steps, just press the Ctrl + Y keyboard shortcut multiple times until you reach the point up to which you want the actions to be restored.
Other Points to Remember
- The maximum number of undos in Excel is set to 100 by default. You can undo up to 100 recent actions using the keyboard shortcut.
- Undo and redo are typically session-based. Once you close your Excel workbook, all undo/redo history is cleared. You cannot undo actions from a previous session after reopening a file.
- Excessive use of undo and redo in large data files can impact performance, as Excel needs to keep track of many changes. However, this is generally only noticeable in very large files.
Actions You Can’t Undo
Some actions clear the undo list completely, so Ctrl + Z can’t take you back after them:
- Running a macro: any change made by VBA code can’t be undone, and running a macro also clears the earlier undo history.
- Deleting a worksheet: a deleted sheet can’t be brought back with Undo.
- Closing the workbook: the undo history is lost when you close the file.
So, before you run a macro or delete a sheet, save a copy of the file if you might need the old version.
Undo Multiple Actions at Once
Instead of pressing Ctrl + Z again and again, click the small arrow next to the Undo button (on the Home tab in Microsoft 365, or on the Quick Access Toolbar in older versions). It shows the list of your recent actions, and you can select up to the action you want to go back to. The Redo button has the same list.
Frequently Asked Questions
What is the difference between Redo and Repeat?
Ctrl + Y works as Redo after you have undone an action. When there’s nothing to redo, Ctrl + Y (or F4) repeats your last action instead, like applying the same formatting to another cell.
Can I undo after saving the file?
Yes. Saving doesn’t clear the undo history, so you can still press Ctrl + Z after saving, until you close the workbook.
Can I increase the undo limit?
Not from Excel’s options. The 100-action limit can only be changed with a Windows registry setting, and a higher limit uses more memory.