Closing Excel when Closing the Last Workbook

by Allen Wyatt
(last updated December 22, 2018)

2

Jim noticed something frustrating when he was wrapping up a session with Excel. When he opens a workbook, everything is fine and works great. When he closes the workbook by clicking the close button at the upper-right of the program window, the workbook closes but Excel remains open. There is no workbook open at this point; only a blank Excel program window. He has to close it explicitly, which means an extra step when closing down Excel. He wonders if there is a way to make Excel close completely when he closes the last workbook on which he is working.

Before getting into theories and workarounds, it is good to review a bit about close buttons. Actually, in Excel 2007 and Excel 2010 there are two close buttons near the upper-right corner of the screen. One is red; if you hover the mouse over it, the ToolTip simply says "Close." This is the close button for Excel itself. The other is not red; if you hover the mouse over it, the ToolTip says, "Close Window." This is the close button to dismiss the document window.

In Excel 2013 and later versions this changed. There is now a single close button at the upper-right of the screen. Hover over it with the mouse and the ToolTip says "Close." In other words, Microsoft has done away with the "Close Window" button in later versions of Excel. Interestingly enough, the problem that Jim describes has also been done away with; it only exists in Excel 2007 and Excel 2010, and then only on some systems. (I verified this on several systems; the problem occurs when you click the Close button—the red one. On the last workbook, on some systems, it closes the workbook window, but leaves the program window open.)

The prevailing theory as to why this occurs in Excel 2007 and Excel 2010 is that Microsoft changed the way the Personal workbook was handled. As the story goes, since the Personal workbook is always open (even when it is hidden), the Excel program window stays open because Excel senses that a workbook (the Personal workbook) is still open.

Nonetheless, it is still frustrating. There is a way around it, but it involves changing how you close workbooks and the program. Instead of clicking on the close icon (the red X in the upper-right of the screen), use the following shortcut keys:

  • Ctrl+F4. This shortcut closes the active window, meaning that it closes whatever workbook you are viewing. (This is the same as clicking on the non-red Close button.)
  • Alt+F4. This shortcut closes the active application—Excel—and any document windows it may have open.

It is this second shortcut that is the handiest for shutting down Excel. It is interesting to note that in Excel 2013 and later versions these keys do essentially the same thing—they close one Excel workbook at a time. Even though both shortcuts close one Excel workbook at a time, Ctrl +F4 leaves Excel open while Alt+F4 closes Excel after the last workbook is closed. This is a completely different behavior than in earlier versions of Excel.

You could also try a modification on your red-X-clicking routine: Hold down the Shift key as you click. This modification has the same result as pressing Alt+F4, closing Excel and all open document windows.

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

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

Excel Filters and Filtering

Excel provides two ways to filter your data so that only what you want to see is displayed. Discover how filtering works ...

Discover More

Printing a Number of Different Pages

If you don't need to print an entire workbook, it can be confusing to figure out how to print just certain pages. This ...

Discover More

Inserting Only Part of a File

You can easily insert one document within another document. What you may not know is that you can limit which part of a ...

Discover More

Program Successfully in Excel! John Walkenbach's name is synonymous with excellence in deciphering complex technical topics. With this comprehensive guide, "Mr. Spreadsheet" shows how to maximize your Excel experience using professional spreadsheet application development tips from his own personal bookshelf. Check out Excel 2013 Power Programming with VBA today!

More ExcelTips (ribbon)

Dividing the Screen Unevenly between Two Workbooks

When working with multiple workbooks, you'll typically want to resize the workbook windows so you can see the data from ...

Discover More

Converting PDF to Excel

Reports and other formal documents are often distributed in PDF format so that they can be read and printed on a variety ...

Discover More

Changing the Default Font

It makes sense that when Excel creates a blank workbook, it must figure out which font to use for that workbook. ...

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}] 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 4 + 7?

2018-12-31 04:57:54

Mike Hodkinson

Simple solution:
If you don't want Excel to close when closing the last / only workbook open just use CTRL + W which closes the workbook but not the application.


2018-12-22 11:31:03

Joe

Good tip Alan. In the past i have used Control+W to close workbooks and then finally do the Alt+F4 on the empty application window. You have convinced me to use Alt+F4. I used Control+W because it worked for MS Word. But Alt+F4 works too.


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.