Undo Changes in Excel
It is common for humans to make mistakes. When we’re working with Excel data, we usually make mistakes at some point that we want to delete and revert to the original data, one action or step, two actions, or more. Undo feature is the solution that allows us to track the last 100 changes made to our worksheet, and we can reverse the changes at any point when required.
In this article, we discuss the step-by-step tutorials to undo changes in Excel in various ways. Using Excel’s undo feature, we can quickly revert any unexpected mistake and go back to a state where the data was accurate enough to work with or modify.
How to undo changes in Excel?
Excel has several methods for performing most actions. Similarly, we can also undo the changes made to our worksheets using two different methods, as listed below:
- Undo Changes using the Keyboard Shortcut
- Undo Changes using the Quick Access Toolbar
Let us now discuss each method in detail:
Undo Changes using the Keyboard Shortcut
Keyboard shortcuts are faster than any other method to perform any action or task in Excel. Excel has a variety of keyboard shortcuts, some predefined, and some can be created manually. However, it does provide a quick keyboard shortcut key to undo the changes in Excel by default. It means we don’t need to set any shortcut key for undoing action in excel.
To undo the changes in Excel, we need to press and hold the Ctrl key and then press the ‘Z’ key on the keyboard, i.e., Ctrl + Z. This is the fastest way to undo a previous change; it only works for Windows.
On MacOS, we must use the Command key in place of the Ctrl key, and the action will be undone.
Pressing the keyboard shortcut once helps us to undo the last action. However, we can press the shortcut key multiple times to undo multiple changes. Whenever we press the Undo shortcut key once, Excel will revert the corresponding change. In this way, we can reverse several actions, particularly up to the last 100 actions that we performed in the sheet in active mode.
Undo Changes using the Quick Access Toolbar
Although we can use keyboard shortcut keys to undo changes in Excel, it can be a daunting task when we need to revert the changes made about 10 steps ago. We have to press the keyboard shortcut several times in series in such a case. Instead of pressing the shortcut keys multiple times, we can use the Quick Access Toolbar, which will be more convenient to undo the changes.
The Quick Access Toolbar is located at the top of the Excel window. It includes shortcuts that help us perform frequently used tasks with a single click.
A shortcut to use the Undo action is found before the Redo shortcut on the Quick Access Toolbar. It is visible only after making some changes to the sheet. This means if we create a new sheet, the undo shortcut is grayed out or cannot be clicked because there is nothing to undo. Like the Undo keyboard shortcut, we can click on the Undo shortcut once or twice from the Quick Access Toolbar to undo the corresponding changes accordingly.
The Excel undo shortcut on the quick access toolbar looks like the following image:
The main use of Undo shortcut on the Quick Access Toolbar comes in a role when we need to revert changes from multiple last actions or steps. In such cases, we can click on the drop-down icon next to the Undo shortcut on the Quick Access Toolbar. It displays all possible actions that can be undone within the active sheet. We can select a particular point or position from the drop-down list of previous actions to undo all the changes between the selected point and the current point.
Although the Undo shortcut gets installed with Excel by default, there may be cases when we don’t see the shortcut on the Quick Access Toolbar due to some unexpected changes in the settings. In such a case, we can manually add the Undo shortcut on the Quick Access Toolbar from Settings and use the shortcut accordingly when required.
Adding an Undo button to Quick Access Toolbar
If we don’t see the Undo button in the Quick Access toolbar, we or someone else may likely have removed the button from the toolbar by mistake. We can perform the following steps and get the Undo button back on the toolbar:
- First, we need to go to the File tab and choose the ‘Options‘ from the list.
- After choosing the ‘Options’, the window named ‘Excel Options‘ is launched where we can access all the settings of Excel. However, we must click the ‘Quick Access Toolbar‘ option from the left side list, as shown below:
- Next, we need to click the drop-down menu under ‘Choose commands from‘ and select the ‘All Commands‘ option.
- After getting the Excel commands list, we must select the ‘Undo‘ command and click on the ‘Add > >‘ button.
- After clicking the ‘Add > >’ button, the Undo command will be added to the right-hand side box. Once the command is added in the right side box, we need to save the changes by clicking the OK
- After saving the settings, we can access the Undo command shortcut from the quick access toolbar.
Revert Undo: Redo an Undone Action
When we undo changes in Excel but realize that we need to get those changes back to our sheet, we can take advantage of the Redo command. The redo command is the exact opposite of the undo command. However, the redo command is inaccessible if no undo action has been performed in the active sheet.
The Redo command can be used similarly to the Undo command, either by keyboard shortcuts or the Quick Access Toolbar. It’s next to the Redo button in the Quick Access toolbar. We can add it by following the same process we did in this article to add the Undo shortcut to the Quick Access Toolbar above if it doesn’t exist.
To quickly redo an action or set of actions, we can use the keyboard shortcuts Ctrl + Y (on Windows) and CMD + Y (on MacOS) once or as many times as desired.
Example: Undoing changes in Excel
Let us understand the working of the undo command and undo changes in our Excel sheet. To understand this, we will first make some random actions in the sheet and then use the undo command to revert all the changes made to the sheet.
Suppose that we create an empty Excel sheet and insert random value in cell A1 by applying the RANDBETWEEN formula, as shown below:
Next, we copy the formula from cell A1 and paste it into a range from cell A1 to E10.
So far, we have made two different changes to our empty or newly created Excel sheet. Next, we change the background color, font color, and font size to the selected range.
Finally, we copy the entire range and paste it on the same range as values using the Paste Special feature.
At this stage, Excel stores all the changes we made in an empty sheet, and we have the data within the sheet without formulas.
The last action we took was to remove the formula and normalize the values in the selected range. Now, if we press the Undo shortcut (Ctrl + Z) once, Excel will undo the change and show the value along with the RANDBETWEEN formula.
In the above image, the values change randomly due to RANDBETWEEN, and hence, they are not the same as before.
Now suppose, we want to undo all the changes and get our sheet back in a blank state. For this, we have to press the undo shortcut (Ctrl + Y) several times until the sheet becomes empty. Alternatively, we can access the Undo drop-down list from the quick access toolbar to see all the changes made to the sheet and click on a particular action from the list to immediately return to that state. In our example, we can click on the last option from the undo drop-down list to undo all changes (10 actions that we made) immediately and reach the state when our sheet is blank.
After undoing all the changes, our sheet becomes as empty as before. However, the actions are still saved and can be restored using Redo. The following image displays all the actions saved under the Redo drop-down list:
In this way, we can undo changes in Excel worksheets.
Limitations of Undo in Excel
- The Undo command is grayed out when creating a new sheet, and we can’t click on it. This happens because the Undo command is directly dependent on the changes made to the sheet, and the newly created sheet is a blank sheet with no changes.
- The Undo command is accessible only when changes are made in the same active session. It means that if we make changes to the sheet, close the sheet and reopen it in Excel, the Undo command does not work. However, we can undo changes to the sheet as long as we keep it open after making changes.
- If we receive an Excel file from someone and try to undo the changes made by the person sharing the sheet, we will not be eligible to do so. In such a case, the session is terminated after the person makes the change. However, when working with Excel for Web, changes are saved on the cloud and can be restored or undone whenever necessary.