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

Determining a Paragraph's Style in VBA

When processing a document via a macro, it is often helpful to understand what style has been applied to a paragraph. You ...

Discover More

Highlighting Every Thousandth Character

Not satisfied with the detail provided by the Word Count feature in Word? Perhaps you want to actually know where every ...

Discover More

Creating Worksheets with a Macro

Using a macro to add worksheets to your workbook is easy. This tip provides two different methods you can use.

Discover More

Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!

More ExcelTips (ribbon)

Entering Dates in Excel

When you type information into a cell, Excel tries to figure out what type of information you are entering. If Excel can ...

Discover More

Viewing Your Work Full-Screen

Want to use the maximum space possible for displaying information on screen? You'll want to learn how to use the ...

Discover More

AutoFilling Numbers with a Trailing Period

The AutoFill tool is very handy when it comes to quickly filling cells with a sequence of values. Sometimes, however, it ...

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 five more than 3?

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.