Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

How to Reverse a Command Z in Excel

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Excel's Undo (Ctrl+Z) is not a true toggle, so there is no single "reverse undo" shortcut that reinstates the action you just undid. The practical way to get an undone action back is to press Redo (Ctrl+Y on Windows, or the Redo arrow in the Quick Access Toolbar), and if Redo is unavailable because you did something else in between, you recover the change from the file's version history, a backup copy, or by re-entering the edit. The steps below cover each route in order of reliability.

What You'll Need

  • Excel for Windows, Excel for Mac, or Excel for the web (labels and shortcut keys differ slightly by version, platform and region).
  • The workbook still open, or saved to OneDrive/SharePoint if you plan to use version history.
  • AutoSave or AutoRecover enabled for the best chance of recovering older states.

Step-by-Step

  1. Try Redo first. Immediately after an undo, press Ctrl+Y on Windows. On Mac, press Cmd+Y, or use the Redo button (a curved arrow) next to Undo in the Quick Access Toolbar. This reverses the last undo and restores the change.
  2. Use the toolbar buttons if shortcuts fail. The Quick Access Toolbar at the top-left of the window has Undo and Redo arrows. Click the Redo arrow. If the arrow is greyed out, Redo is not available and you must use another method.
  3. Check whether you can still redo. Redo only works until you perform another action. Typing in a cell, clicking a different sheet, or saving can clear the redo stack. If the Redo arrow is grey, skip to the recovery steps below.
  4. Re-enter the change manually. If the undone action was a simple edit (typing a value, deleting a row, applying a format), repeat it. For a deleted row or column, select the row or column header, right-click and choose Insert, then retype the data if it is gone.
  5. Restore from version history (OneDrive or SharePoint). Open the workbook, go to File > Info > Version History (the exact label can differ slightly by version). Pick a version saved before the undo and choose Restore. This replaces the current file with that version, so save a copy first if you need the current state.
  6. Restore from AutoRecover. If Excel closed unexpectedly, reopen Excel and look for the Document Recovery pane, or go to File > Info > Manage Workbook > Recover Unsaved Workbooks. Choose the most recent recovered copy and save it under a new name.
  7. Use a manual backup. If you saved a copy elsewhere (a USB drive, a network folder, or an emailed attachment), open that copy and copy the affected cells back into the current workbook.
  8. Prevent the problem next time. Turn on AutoSave for cloud-stored files, and save a dated copy before large edits (File > Save As). This gives you a rollback point that does not depend on the undo stack.

Common Mistakes

  • Pressing Ctrl+Z again expecting it to redo. A second Ctrl+Z undoes another action; it does not reverse the first undo.
  • Clicking or typing somewhere else before trying Redo. Any new action clears the redo stack.
  • Saving the file immediately after an accidental undo. Saving does not itself block Redo, but it does overwrite the previous saved state, so version history may no longer hold the pre-undo version.
  • Assuming version history exists for a local file. It is only available for workbooks stored in OneDrive or SharePoint with the feature enabled.
  • Restoring a version without saving the current file first, which can discard work done after the undo.

Tips

  • Learn both shortcuts: Ctrl+Z to undo and Ctrl+Y to redo on Windows; Cmd+Z and Cmd+Y on Mac. The Mac menu labels are Edit > Undo and Edit > Redo.
  • Use the drop-down arrow next to the Undo button to see the list of recent actions; you can undo several at once, but Redo still only restores one step at a time.
  • For big edits, work on a copy of the sheet (right-click the sheet tab > Move or Copy > Create a copy) so the original stays intact.
  • If you use Excel for the web, Undo and Redo are in the Home tab's editing controls, and version history is available for files stored in OneDrive.

Troubleshooting

  • Redo is greyed out: you performed another action after the undo. Use version history or a backup instead.
  • Ctrl+Y does nothing: check that the workbook window is active and that you are not editing inside a cell. Press Esc to leave cell edit mode, then try again.
  • Version History is missing: the file is likely saved locally, or the cloud service does not keep versions for it. Check File > Info to see the file location, and move the workbook to OneDrive if you need this feature.
  • Recovered file is out of date: AutoRecover saves at intervals, so some recent edits may be missing. Compare with the current file before overwriting anything.
  • Excel crashes when undoing: update Excel to the latest version, disable add-ins one at a time (File > Options > Add-ins), and reopen the file. If the problem persists, repair Office from the Windows settings.

Frequently Asked Questions

Is there a keyboard shortcut to reverse Ctrl+Z?

Yes: Ctrl+Y is Redo on Windows and Cmd+Y on Mac. It only works while the redo stack is intact, meaning you have not performed another action since the undo.

Can I undo an undo after closing and reopening the file?

No. The undo and redo history is cleared when the workbook closes. Use version history or a backup copy instead.

Does Excel for the web support Redo?

Yes. Use the Redo button in the Home tab or Ctrl+Y (Cmd+Y on Mac). Version history is also available for files stored in OneDrive or SharePoint.

Why is my Redo button greyed out?

Because a new action (typing, formatting, switching sheets, saving) cleared the redo stack. Recovery then depends on version history, AutoRecover, or a manual backup.

Can I recover a deleted sheet after undoing the deletion?

If Redo is still available, press Ctrl+Y immediately to restore the sheet. If not, restore a previous version from version history, or right-click any sheet tab and choose Unhide if the sheet was only hidden rather than deleted.

Does saving the file prevent me from redoing?

Saving does not clear the redo stack by itself, but it overwrites the saved state, so version history may no longer contain the pre-undo version. Try Redo first before saving.