How to Use Undo, Redo, and Repeat in Excel

Undo, Redo, and Repeat are common actions in Microsoft Excel. You can access them through the menu in Excel as well as with a keyboard shortcut.

To undo something in Excel means to delete what was just done; to remove the most recent action and revert the worksheet to the state it was in just before that action was performed. Redoing has the opposite effect: what was just undone will be returned again. Repeating in Excel is how you perform the same action you just performed, but on something else.

Specific situations call for using Undo, Redo, and Repeat. Knowing which one to use, and how to use it, will help you work more quickly through Excel and automate tasks.

How Undo Works in Excel

Screenshot showing how to undo an action in Excel
Using the Undo Button in Excel.

Use Excel's Undo action to quickly reverse the previous action. For example, you might use it to get back a formula that was just deleted from a cell, to move a cell to its previous location after a move, to resize a row or column you accidentally made too large or too small, or to re-insert a chart that you removed.​

Windows users can undo in Excel with the Ctrl+Z shortcut, while Mac users need to strike Command+Z to undo an action. Using that shortcut more than once will keep undoing each subsequent action.

Another way to get to the Undo option in Excel is through the Quick Access Toolbar: it's the icon with the arrow pointing to the left. Clicking the small arrow next to the icon shows all the previous actions, letting you undo multiple actions in one click.

Limitations

By default, in Excel versions 2007 and newer, the maximum number of Undo actions you can preform is set to 100. Prior to Excel 2007, the limit was 16.

Windows computers can adjust the limit to a smaller number by tweaking the Windows Registry. The limit is stored in the UndoHistory value located in the HKCU hive, under \Software\Microsoft\Office\<version>\Options\.

Excel is unable to undo certain actions like clicking menu items, saving files, and deleting sheets.

Using Excel's Redo Action

Screenshot showing how to use the redo button in Excel
Using the Redo Button in Excel.

To redo an Excel action is to re-apply or undo what was just undone. In other words, it's a way to reverse an Undo action. You might use Redo if you decide to keep something deleted that you just brought back with the Undo action, to keep a formula the way it was before if undoing it broke its functionality, etc.

A redo can be performed in Excel for Windows via the Ctrl+Y keyboard shortcut, or on a Mac with Command+Y. Like the Undo action, Redo can be performed multiple times by using the same keyboard shortcut over and over.

Excel has a button for Redo in the Quick Access Toolbar, right next to the Undo button by default. It's represented by an icon with an arrow pointing to the right. The arrow to its right is used to redo more than one action at once.

Limitations

The Redo action has the same limitation as the Undo action when it comes to how many times it can be performed in a row: 100 times for Excel 2007 and newer, and 16 times for older editions of Excel.

You cannot redo something unless that action was affected by the Undo action. For example, since you can't undo a worksheet deletion, Redo has no effect on worksheet tabs.

How to Quickly Repeat Something in Excel

Screenshot of the repeat button in Excel 2016
Using the Repeat Button in Excel.

The Repeat action in Excel is linked to Redo. It uses the same shortcut (Ctrl+Y and Command+Y) and works in a similar way: it's used to repeat something that was just performed.

For example, if you apply red text to one cell, you can click another, or even multiple cells, and repeat the same formatting style on those cells. In this case, they would turn red.

The Repeat option can be used for other things, too, such as inserting and deleting columns and rows.

Repeat isn't readily available in the menu. To access it, either use the keyboard shortcut or add it to the Quick Access Toolbar:

  1. Click the drop down menu next to the Undo and Redo buttons.
  2. Click More Commands.
  3. At the top of the Quick Access Toolbar window, choose Popular Commands.
  4. In the list of commands, select Repeat.
  5. Click Add >>.
  6. Click OK.

Limitations

Because Repeat is so closely related to Redo, the two cannot be used at the same time. Both buttons are never active simultaneously.

Here's an example: If you change the color of text in cell A1 to blue, it activates the Repeat button on the Quick Access Toolbar, but deactivates Redo like you see in the screenshot above.

This means that the formatting change can be repeated on the contents of another cell — such as B1 — but you can't then redo the color change in A1.

Conversely, undoing the color change in A1 activates the Redo option, but deactivates Repeat, meaning that the color change can be "redone" in cell A1 but it cannot be repeated in another cell.

If the Repeat button has been added to the Quick Access Toolbar, it will change to the Redo button when there is no action in the stack that can be repeated.

More Information on Undo, Redo, and Repeat

Excel uses a portion of the computer's RAM to maintain a list (often called a stack) of recent changes made to a worksheet. The Undo/Redo combination of commands allows you to move forward and backward through the stack to remove or re-apply those changes in the order they were first made.

For example, if you're trying to undo some recent formatting changes, but accidentally go one step too far and undo something you wanted to keep, rather than having to go through the necessary formatting steps to get it back, clicking the Redo button will advance the stack forward one step, bringing back that last format change.

In  Excel 2003 and earlier versions of the program, once a workbook was saved, the Undo stack was erased, preventing you from undoing any actions carried out prior to the save.

Since Excel 2007,  this limitation has been removed, allowing users to save changes regularly but still be able to undo/redo previous actions.