How to Use Undo, Redo, and Repeat in Excel

The undo button in Excel reverts your worksheet to the state it was in just before the most recent action was performed. Redo has the opposite effect: What was just undone will be returned again. Repeat lets you perform the same action you just performed in a different location.

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 and automate tasks. You can access the redo, repeat and undo buttons from the Excel menu, or you can use keyboard shortcuts.

Note: This article applies to Excel 2016, 2013, 2010, Excel for Mac, Excel for Android and Excel Online with exceptions noted.

How Undo Works in Excel

Call Out: The undo icon in Excel for Android

Excel's undo feature lets you quickly reverse previous actions. For example, you might use it to:

  • Get back a formula that was just deleted from a cell
  • Move a cell to its previous location after a move
  • Resize a row or column you accidentally made too large or too small
  • Re-insert a chart that you removed

Windows users can undo in Excel with the keyboard shortcut Ctrl+Z while Mac users can press Command+Z to undo an action. Using these shortcuts more than once will continue undoing subsequent actions.

Another way to use the undo option in Excel is through the Ribbon, or the toolbar that runs across the top of Microsoft Excel. Look for the icon with an arrow pointing to the left. The exact location of this icon will differ depending on which version of Excel you're using. In desktop versions, selecting the smaller downward-pointing arrow next to the icon shows all the previous actions, letting you undo multiple actions at once.

Limitations of Undo in Excel

The maximum number of undo actions you can perform by default is set to 100. Windows users 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

Call Out: The redo icon in Excel for Android

Redo is helpful when you want to reverse an undo action. For example, you may want to return a formula to a previous state if performing an undo action broke its functionality.

A redo can be performed in Excel for Windows with the Ctrl+Y keyboard shortcut. Mac users can perform redos with the shortcut Command+Y. Like the undo action, redo can be performed multiple times by using the same keyboard shortcut over and over.

The Excel Ribbon also has a redo button right next to the undo button. It is represented by an icon with an arrow pointing to the right.

Limitations of Redo in Excel

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. 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

The repeat action in Excel utilizes the same shortcuts as redo (Ctrl+Y for Windows and Command+Y for Mac). Repeat, as its name implies, lets you repeat an action in a different cell.

The mobile versions of Excel and Excel Online do not support the repeat feature.

For example, if you apply red text to one cell, you can click another cell (or even multiple cells) and repeat the same formatting style on those cells. 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 Excel Ribbon. To access it, either use the keyboard shortcut, or add it to the Ribbon by following these steps:

  1. Select the drop down menu next to the undo and redo buttons
  2. Select More Commands
  3. At the top of the Ribbon, choose Popular Commands
  4. Select Repeat from the list of commands
  5. Select Add >>
  6. Select OK

Limitations

Because repeat is so closely related to redo, the two cannot be used at the same time. Consider this example: If you change the color of text in cell A1 to blue, then the repeat button on the Ribbon will become active, and the redo button will become grayed out. 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 it deactivates repeat. Therefore, the color change can be "redone" in cell A1, but it cannot be repeated in another cell.

Undo, Redo, and Repeat and Excel Stack

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, let's say you're trying to undo some recent formatting changes, but you 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, selecting redo will advance the stack forward one step and bring back that last format change.