Undo in Excel: Reverse Your Last Action

How-to basics · Updated November 20, 2026

To undo the last action in Excel for Microsoft 365 on Windows, press Ctrl+Z. Press it again to undo earlier actions; on a Mac, use Command+Z. If you have already undone too much, use Ctrl+Y on Windows or Command+Y on Mac to redo.

Undo a change right away

Undo is the quickest way to reverse a recent change while you are still working in the workbook. It commonly reverses edits to cell contents, formatting changes, and actions such as deleting a row. After pressing the shortcut, check the affected cells or sheet to make sure Excel reversed the action you intended. If it did not go far enough, press the shortcut again.

There is an important distinction between a change that has been committed and one you are still editing. If you type into a cell and have not pressed Enter, Tab, or otherwise committed the entry, press Esc to cancel that in-progress edit. Once you commit it, use Ctrl+Z to undo it. Esc cancels the current edit; it does not roll back the previous action in the workbook.

You can also click Undo on the Quick Access Toolbar, usually near the upper-left corner of the Excel window. If the toolbar is not visible or the button is elsewhere, the keyboard shortcut is often faster. Undo affects the open workbook’s recent action history, so make sure the workbook you mean to change is active.

Undo several actions or choose where to stop

Excel keeps a sequence of recent actions, so repeated use of Undo steps backward through that sequence. For example, if you entered a value, applied bold formatting, and then changed a fill color, one undo may reverse the fill color; the next may remove bold; another may undo the value entry. The precise sequence depends on the actions Excel recorded.

To back up several steps at once in Windows, click the small arrow beside the Undo button on the Quick Access Toolbar. Excel displays a list of recent actions. Select the point in the list you want to return to, and Excel undoes that action and the newer actions above it. It is not a way to undo just one older action while preserving later ones: undoing an earlier step also rolls back the steps after it.

If the Undo button or its arrow is unavailable, the current context may not offer an undoable action, or the history may have been cleared. Avoid clicking repeatedly without checking the sheet, especially when several changes were made. A careful sequence—undo once, inspect, then decide whether to continue—reduces the chance of removing work you meant to keep.

Use the Undo button and action list

The Undo button is useful when you prefer to click rather than use a shortcut, or when you want to inspect the recent action list before rolling back multiple changes. On Windows, it is part of the Quick Access Toolbar. Depending on how Excel is configured, that toolbar may appear above or below the ribbon. The button’s arrow opens the list; clicking the main button undoes the most recent available action.

The displayed descriptions are intended to help identify the steps, but they may be brief. If the list includes several similar edits, compare the workbook before and after each undo rather than assuming a description covers only one cell. Selecting an earlier item in the list reverses it and all newer recorded actions, so do not select an older step casually.

If you cannot see the Quick Access Toolbar, look for the toolbar or ribbon display controls in the Excel window and check whether the toolbar is hidden. You can also use Ctrl+Z without finding a ribbon command. The Quick Access Toolbar’s placement and appearance can differ with window layout and Excel settings, but the shortcut remains the practical first choice.

Redo a change you undid by mistake

Redo reapplies an action that you just reversed. In Windows Excel, press Ctrl+Y or use the Redo button on the Quick Access Toolbar. On Mac, press Command+Y where supported by the current keyboard setup, or use the toolbar command. Redo is especially useful if you pressed Ctrl+Z one time too many and want the last undone edit back.

Redo follows the same sequence logic as Undo. You can redo multiple steps in order, but making a new change after undoing may replace the redo path. For instance, if you undo a cell edit and then enter a different value, Excel may no longer offer the old edit as a redo action. If you realize you have undone too much, redo immediately before making unrelated edits.

Excel also uses Ctrl+Y in some contexts to repeat an action, rather than to redo an undo. The result depends on whether there is an undone action available and on the action being performed. If the shortcut does not restore what you expect, use the Redo button or check the workbook rather than assuming the operation succeeded.

Why Undo may not work

Undo is not a universal history system for every event in Excel. Some operations cannot be reversed with the normal Undo command, and certain actions can clear the available history. Running a VBA macro is a notable example: macros can make many changes at once, and running one clears Excel’s undo history. Ctrl+Z cannot reverse what the macro did.

The history is also temporary rather than a permanent record. Closing a workbook ends the opportunity to use that workbook’s current undo sequence. Some commands or interactions with external data and other features may also behave differently from ordinary cell edits. If Undo is greyed out, does nothing, or skips the change, do not keep trying random commands; first consider whether the workbook was closed, a macro ran, or the operation is not undoable.

For a change that cannot be undone, consider whether you have a saved copy, an AutoRecover version, or a cloud version history entry. These options can restore earlier workbook content, but they may also replace newer work. Before restoring a version, preserve the current file under a different name if you might need to compare or recover its latest changes.

Recover work after closing or losing the undo history

If you closed the workbook or Undo is no longer available, recovery depends on how the file was saved. For a workbook stored in OneDrive or SharePoint, use its Version History to inspect earlier saved versions. In Microsoft 365, you can generally open the file’s name or File information and choose Version History. Review the dates and contents carefully; restoring an older version can replace the current version, so consider opening or saving a copy before choosing Restore.

For an unsaved or unexpectedly closed workbook, check Excel’s recovery options. On Windows, open File > Info and look for Manage Workbook and Recover Unsaved Workbooks, if available. Excel may show recovered files after a crash or restart as well. Available recovery files depend on settings, timing, and whether Excel had a chance to save AutoRecover data, so this is not guaranteed to recover every recent edit.

AutoSave and AutoRecover are different safeguards. AutoSave continually saves supported files stored in OneDrive or SharePoint, while AutoRecover periodically records information to help recover work after an unexpected interruption. Neither is the same as an unlimited Undo history. If the workbook is important, save it regularly and keep an independent copy before making risky structural changes.

Windows, Mac, and Excel for the web

For the Windows desktop version, the usual shortcuts are Ctrl+Z for Undo and Ctrl+Y for Redo. On Mac, the standard Undo shortcut is Command+Z; Command+Y is commonly used for Redo in Excel, although keyboard configuration and version can affect shortcuts. The Quick Access Toolbar or the corresponding Undo and Redo commands provide a visual alternative when a shortcut behaves unexpectedly.

Excel for the web also provides Undo and Redo, with keyboard shortcuts that depend on the computer: Ctrl+Z and Ctrl+Y on Windows, and Command+Z and commonly Command+Y on Mac. The browser version’s menus and toolbar layout may differ from desktop Excel. If the workbook is shared, changes made by other people may appear as they edit; undoing your own recent action should not be treated as a way to roll back the entire shared file or another person’s work.

When using a different version, check the Undo and Redo buttons in the interface if you are unsure about a shortcut. The key idea is the same across versions: Undo reverses a recent recorded action, Redo restores an action just undone, and neither should be confused with recovering a saved historical copy.

Safer ways to make changes you may need to reverse

For ordinary edits, Ctrl+Z is usually enough. For changes with a wider impact—such as deleting a worksheet, replacing a large range, or running automation—use a safeguard before proceeding. Save a separate copy, duplicate the sheet, or confirm that the file has a usable cloud version history. This is particularly important before running a macro because the normal undo sequence will not restore the workbook afterward.

  • After a small edit, use Undo once and inspect the result before pressing it again.
  • Before a large replacement or deletion, save a copy with a clear name so the original remains available.
  • Before running a macro, save a copy of the workbook; macros cannot be undone with Ctrl+Z.
  • For shared cloud files, check Version History before restoring an older state, and protect any newer work you want to keep.

These precautions do not make every operation reversible, but they offer a reliable fallback when the Undo sequence is unavailable or does not cover the change. They also prevent a common misconception: saving a workbook does not turn its Undo list into a permanent record. Undo is designed for recent work in the active session, while backups and version history are for recovering earlier saved states.

Frequently Asked Questions

What is the shortcut to undo in Excel?

On Windows, press Ctrl+Z. On Mac, press Command+Z. You can also click the Undo button on the Quick Access Toolbar.

How do I undo more than one thing in Excel?

Press the Undo shortcut repeatedly, checking the worksheet as you go. In Windows desktop Excel, the arrow beside the Quick Access Toolbar’s Undo button also lets you select an earlier point; Excel will undo that action and the newer actions after it.

How do I redo something in Excel?

Use Ctrl+Y on Windows or the Redo button. On Mac, Command+Y commonly redoes an action. Redo works for actions you have just undone, but a new edit can remove the redo sequence.

Can I undo after I close and reopen an Excel file?

Usually, no: closing the workbook ends its current undo history. To recover an earlier saved state, check OneDrive or SharePoint Version History, or look for an AutoRecover or unsaved workbook copy if the file was not saved properly.

Why can’t I undo a macro in Excel?

Running a VBA macro clears Excel’s normal undo history, so Ctrl+Z cannot reverse the macro’s changes. Save a separate copy before running a macro, and use an appropriate backup or earlier version if you need to recover the workbook.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.