Close Excel Shortcut Key for Windows and Mac

How-to basics · Updated November 19, 2026

In Excel for Microsoft 365 on Windows, press Ctrl+W to close the active workbook. To quit the Excel application itself, press Alt+F4; on a Mac, use Command+W to close a workbook window and Command+Q to quit Excel.

The Windows Shortcut to Close a Workbook

Ctrl+W is the quickest answer when you want to close the Excel workbook you are currently using. It closes the active workbook window, not necessarily the Excel program. If you have several workbooks open, the other open workbooks remain available, and you can continue working in Excel.

Excel also supports Ctrl+F4 as a Windows shortcut for closing the active workbook window. On many Windows applications, Ctrl+F4 closes the current document while Alt+F4 closes the application; that distinction is useful in Excel, too. If you only want the current workbook out of the way, use Ctrl+W or Ctrl+F4. If you intend to leave Excel entirely, use Alt+F4.

Before closing, Excel checks whether the workbook has changes that have not been saved. If it does, a prompt lets you save, discard the changes, or cancel the closing action. If you do not see a prompt, the workbook may have no unsaved changes, or the changes may already have been saved.

Closing a Workbook Is Not the Same as Quitting Excel

A workbook is the file containing your worksheets, such as a sales report or household budget. Excel is the application that opens and edits that file. Closing one workbook and quitting the application are therefore different actions, even though both can make the current spreadsheet disappear from view.

On Windows, Ctrl+W closes the active workbook. If it was the last workbook window, Excel may show its start screen or a blank application window, but Excel can remain open. Alt+F4 asks Excel to close the application. If other workbooks are open, Excel may need to close them as well and will prompt about unsaved changes before discarding any work.

This difference matters when you plan to open another file, keep Excel ready, or shut down your computer. To switch files without ending your Excel session, close only the workbook you no longer need. To finish using Excel, close or save any open files and then quit the application.

How to Use the Shortcut Safely

For a routine close on Windows, first make the workbook you want to close the active window. Then press Ctrl+W. If a save prompt appears, choose the option that matches what you want to do. These steps help avoid closing the wrong file or losing edits:

  1. Check the workbook name in Excel’s title area so you know which file is active.
  2. If you want to preserve recent edits, press Ctrl+S to save before closing.
  3. Press Ctrl+W to close the active workbook, or Ctrl+F4 as an alternative.
  4. Respond to any save prompt. Choose Save to keep your changes, Don’t Save to discard them, or Cancel to return to the workbook.

Saving first is especially sensible when you have edited formulas, pasted data, changed formatting, or made several changes whose status you are unsure about. Ctrl+S does not close the file; it simply writes the current changes to the workbook. You can then close it separately.

What Happens When Excel Asks You to Save?

A save prompt is a safeguard, not an error. It means Excel has detected changes since the last save and needs you to decide whether to keep them. Select Save if the edits should remain in the file. Select Don’t Save only if you are certain those edits are unnecessary. Select Cancel if you want to inspect the workbook or continue editing instead of closing it.

If you choose Save for a new workbook that has not yet been named, Excel opens a save dialog so you can choose a location and file name. For an existing workbook, it generally saves to the current file location. If the file is read-only or you lack permission to change its location, Excel may require you to save a separate copy or choose another location.

Excel for Microsoft 365 may also work with files stored in OneDrive or SharePoint, where changes can be saved automatically. That does not make it pointless to check the save status: a connection issue, a sync delay, or an unresolved prompt can affect whether the latest edits reached the intended file. When the work is important, confirm the status and make sure you are closing the correct workbook.

Other Ways to Close an Excel Workbook

A keyboard shortcut is convenient, but the ribbon and window controls are useful when you are learning Excel or cannot remember the keys. In the Windows desktop application, choose File > Close to close the current workbook. This is different from choosing an option to exit Excel: Close targets the workbook, while quitting ends the application.

You can also click the workbook window’s close button. In Excel configurations where the workbook and application share a main window, the top-right close button may close the Excel application when it is the last open workbook. If multiple workbook windows are open, the close control can close only the active one, depending on how the windows are arranged. Look at the window and title area before clicking, especially when several files are open.

Use the menu or window button if you want to see the action before taking it, or if a keyboard shortcut is intercepted by another program. These methods still trigger the same save check when the workbook has unsaved changes. They do not create a different kind of close or bypass the need to decide what to do with edits.

Mac and Excel for the Web

In Excel for Microsoft 365 on Mac, press Command+W to close the active workbook window. Press Command+Q to quit Excel. As on Windows, closing a window and quitting the application are separate tasks. The Mac menu bar also provides the relevant commands, including File > Close for a workbook and the Excel application menu’s quit command for leaving Excel.

Excel for the web runs inside a browser, so browser shortcuts behave differently from desktop Excel shortcuts. In most browsers, Ctrl+W closes the current browser tab; it is not a reliable way to close just a workbook inside Excel for the web. Use the browser tab’s close button when you are finished with that Excel page. The workbook itself is generally saved to its cloud location automatically, but allow syncing to finish and check for any save or connection warning before closing the tab.

Because shortcut handling can depend on the operating system, application, and browser, do not assume that a Windows desktop shortcut has the same effect in Excel for the web. If you are unsure which version you have open, check whether Excel is running as a desktop application or inside a browser window.

Common Problems and Quick Checks

If Ctrl+W seems not to work, first check whether a dialog box is open. A save prompt or another modal dialog may be waiting for a choice, so Excel will not act on the workbook shortcut until you respond. If the shortcut closes a browser tab instead, you are probably using Excel for the web rather than the Windows desktop application.

Other causes can include a different window having focus, a keyboard layout or utility intercepting the key combination, or a workbook window that is hidden behind another window. Click inside the workbook and try again. If you want to quit rather than close one file, use Alt+F4 on Windows; if you want to close only a workbook, avoid Alt+F4 because it targets the application.

  • The workbook disappeared: Check whether it is still open behind another window or whether Excel returned to its start screen.
  • A save prompt appeared: Choose Save, Don’t Save, or Cancel based on whether you want to keep your edits.
  • The browser tab closed: Reopen the page or workbook from its cloud location; use the tab close button rather than Ctrl+W next time in the browser.
  • Excel is still running: That is expected after closing a workbook if the application remains open.

Choosing the Right Shortcut

Choose the shortcut according to what you want to close, not merely what is visible on screen. Ctrl+W is the simple Windows choice for the current workbook. Ctrl+F4 is another Windows option for closing the active workbook window. Alt+F4 is for ending the Windows Excel session. On Mac, the matching distinction is Command+W for a workbook window and Command+Q for quitting Excel.

A practical example: suppose you have an expense workbook and a project tracker open. Pressing Ctrl+W while the expense file is active closes that file, leaving the tracker available. Pressing Alt+F4 instead starts closing Excel as an application and can involve the other open workbook too. If either file contains unsaved edits, handle the save prompts before assuming the operation has finished.

Frequently Asked Questions

What is the shortcut to close an Excel file on Windows?
Press Ctrl+W to close the active workbook. Ctrl+F4 is another shortcut for closing the active workbook window.

Does Ctrl+W quit Excel?
No. In the Windows desktop application, Ctrl+W closes the active workbook. Excel may remain open, especially if other workbooks are open or its start screen appears.

What shortcut closes Excel completely?
On Windows, use Alt+F4 to close the Excel application. On Mac, use Command+Q. Save any work you want to keep before quitting.

What is the Mac shortcut to close an Excel workbook?
Press Command+W to close the active workbook window in Excel for Mac. Command+Q quits the application instead.

Why does Ctrl+W close my browser when I use Excel online?
Excel for the web is open in a browser, where Ctrl+W commonly closes the current tab. Use the tab’s close button instead, and check that your cloud changes have finished saving.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.