Limiting the Scope of the Undo Command

Written by Allen Wyatt (last updated July 9, 2022)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021


Marie often works with a large number of workbooks open at the same time. As she is editing the various workbooks and worksheets, she regularly has to use Undo (Ctrl+Z) to undo an action. Marie wonders if it is possible to have the scope of the Undo command be limited to only the active worksheet or workbook. In other words, if she makes 2 edits on Sheet1, then 1 edit on Sheet2, then switches back to Sheet1, could Undo not pay attention to the edit she made on Sheet2 since that worksheet is no longer active.

The short answer is that this is not possible, particularly if Sheet1 and Sheet2 are in the same workbook. (More on the idea of separate workbooks in a moment.) Excel keeps only a single undo stack, and it is quite strict in stepping through that stack sequentially. It is a safe bet that this is the case because you may want to not only undo actions but possible to redo them after they were initially undone. The sequential action stack (undo stack) makes such actions possible.

As for the case of separate workbooks, it is possible to do what Marie wants if you open each workbook in its own instance of Excel. This, of course, requires more resources as separate instances means completely separate copies of Excel being in memory. It also changes how the workbooks interact with each other when it comes to editing. Because each instance of Excel operates independently of other instances, then each instance maintains its own undo stack and, therefore, undoing an action in one instance of Excel won't affect a workbook in a different instance of Excel. The big thing to keep in mind is that you cannot open the same workbook in different instances of Excel.

If you are interested in understanding more about what it means to work with multiple Excel instances, you'll find this article helpful:

https://answers.microsoft.com/en-us/msoffice/forum/all/what-are-excel-instances-and-why-is-this-important/20c39a6f-0857-4033-b713-18bf72e91d8b

If you want to configure Excel so that it always opens your workbooks in different instances of the program, then this article will be helpful:

https://docs.microsoft.com/en-us/office/troubleshoot/excel/force-excel-to-open-new-instance

Remember that each instance of Excel you open increases the load on your computer. Thus, you may find that using multiple instances works great if you are opening a half dozen or fewer workbooks. However, it may not work so well if you need to open 20 or 30 workbooks. Only testing will determine the impact that multiple instances will have on your system.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (12926) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Hiding Grammar Errors

Are you bothered by the green underlines that Word uses to mark potential grammar errors in your document? You can hide ...

Discover More

Finding Columns of a Certain Width

If you need to find out how many columns are set to be a specific width, you'll need a macro to help determine the info. ...

Discover More

Using Hidden Styles

Using styles to format templates can save a lot of time and ensure consistency when working on several documents. Some ...

Discover More

Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!

More ExcelTips (ribbon)

Using Slashed Zeroes

To reduce the chances of confusion in presenting data, some people like to use zeroes with slashes through them. If you ...

Discover More

Picking a Group of Cells

Excel makes it easy to select a group of contiguous cells. However, it also makes it easy to select non-contiguous groups ...

Discover More

Changing Limited Relative References to Absolute

Do you need to change whether a particular reference in a formula uses a relative or absolute reference? If so, you may ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 6 - 0?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.