Close Excel Shortcut: Windows and Mac Keys

How-to basics · Updated November 19, 2026

To close the active workbook in Excel for Microsoft 365 on Windows, press Ctrl+W or Ctrl+F4. On a Mac, press Command+W. These close the workbook window, not necessarily the Excel application; use Alt+F4 on Windows or Command+Q on Mac to quit Excel.

Close a workbook with the keyboard

With the workbook you want to close active, use the shortcut for your computer:

  • Windows: Ctrl+W or Ctrl+F4 closes the active workbook.
  • Mac: Command+W closes the active workbook window.

If Excel asks whether you want to save changes, choose Save to keep them, Don’t Save to discard changes made since the last save, or Cancel to return to the workbook. If no prompt appears, that does not necessarily mean the workbook was unchanged: AutoSave may have saved it already, or the workbook may not have unsaved edits.

The shortcut applies to the workbook currently in focus. If several workbooks are open, Excel closes the active one; it does not automatically close every other workbook. Check the title bar or switch to the intended workbook before pressing the keys, especially if you have several similarly named files open.

Closing a workbook is not the same as quitting Excel

A workbook is a file, such as an .xlsx spreadsheet. Excel is the application that opens and edits it. Closing a workbook removes that document from the active workspace, while quitting Excel ends the application. The distinction matters if you want to finish with one file but keep Excel available for another.

On Windows, Ctrl+W and Ctrl+F4 close the active workbook. If it was the last open workbook, Excel can remain running and show its start screen or a blank application window, depending on the current interface. To exit the application, use Alt+F4 or choose File > Exit. Alt+F4 closes the active application window, so first make sure Excel is the active program rather than another window.

On Mac, Command+W closes the active workbook window, while Command+Q quits Excel. Closing the last document window does not necessarily quit a Mac application; Excel may remain open in the Dock. This is normal macOS behavior, not evidence that Command+W failed.

Shortcuts on Windows, Mac, and Excel for the web

The key differences are the operating system’s modifier keys and whether Excel is a desktop application or running in a browser. On Windows, the Control key is used for the workbook-close shortcuts. On Mac, use Command rather than Control for the usual close-window shortcut.

  • Excel for Microsoft 365 on Windows: Ctrl+W or Ctrl+F4 closes the active workbook; Alt+F4 exits Excel.
  • Excel for Microsoft 365 on Mac: Command+W closes the active workbook window; Command+Q quits Excel.
  • Excel for the web: Ctrl+W on Windows or Command+W on Mac is generally handled by the browser as a close-tab shortcut. It is not a dependable command to close only the workbook inside Excel for the web.

In the web version, close the browser tab using the browser’s controls when you are ready to leave. Excel for the web normally saves changes to OneDrive or SharePoint automatically while you are connected, but check the save status before leaving, particularly if your connection is interrupted. Browser behavior and shortcut handling can vary, so avoid treating a tab-close shortcut as an Excel-specific command.

What happens to unsaved changes

When a desktop workbook has edits that are not saved, closing it normally brings up a confirmation dialog. Save writes the changes to the current file, Don’t Save closes the workbook without keeping edits made since the last save, and Cancel stops the closing action. If you are uncertain, choose Cancel and use Ctrl+S on Windows or Command+S on Mac to save before closing.

AutoSave can change what you see. For eligible files stored in OneDrive or SharePoint, AutoSave may save changes continuously, so Excel might close without asking. AutoSave availability depends on the file’s location, account, and settings. A workbook stored only on your computer may instead rely on manual saving, unless another saving or recovery feature applies. Look for the save status near the top of Excel rather than assuming that a missing prompt means every edit is safely stored.

AutoRecover is intended to help recover some work after an unexpected interruption; it is not a substitute for saving. If you choose Don’t Save, do not count on AutoRecover to restore edits you deliberately discarded. For important changes, save the workbook before closing and verify that the file is in the intended location.

Close Excel from the menus or with the mouse

If you forget the keyboard combination, use Excel’s menu. In the Windows desktop app, choose File > Close to close the current workbook. To exit the application, choose File > Exit. If Excel displays a save prompt, make the same Save, Don’t Save, or Cancel choice you would after using a shortcut.

On Mac, use File > Close to close the current workbook window, or use the Excel application menu and choose Quit Excel to leave the app. You can also click the window’s close control, but that closes a window rather than necessarily quitting Excel. Menu labels and their placement can change slightly between releases, while the keyboard distinction between closing a document and quitting the app remains useful.

Why the close shortcut may not work

If pressing the expected keys appears to do nothing, check what has focus and what kind of window is open. A cell may be in edit mode, a dialog may be active, or Excel may be waiting for a response to a save prompt. The shortcut can also be intercepted by the browser, remote-desktop software, or another program.

  • Excel is editing a cell: Press Enter to accept the edit or Esc to cancel it, then try the close shortcut again.
  • A dialog is open: Respond to the dialog first. For example, a save confirmation must be answered before the workbook can close.
  • You are using Excel in a browser: Ctrl+W or Command+W may close the browser tab. Use the browser’s tab controls only after checking the workbook’s save status.
  • The wrong workbook is active: Switch to the intended workbook, then use the shortcut. Closing a different workbook can be confusing when several files are open.
  • You want to quit the whole program: Use Alt+F4 on Windows or Command+Q on Mac; Ctrl+W and Command+W are workbook or window commands.

If the app appears frozen, repeating the shortcut rapidly is unlikely to resolve the problem and could make it harder to tell whether a prompt is hidden behind another window. Check the taskbar or Dock for open Excel windows, and look for an unsaved-changes dialog before forcing the application to close.

Choosing the right close command

Use a workbook-close shortcut when you are done with one spreadsheet but may continue working in Excel. Use the application-quit shortcut when you are finished with Excel altogether. On Windows, remembering Ctrl+W for a workbook and Alt+F4 for the app is a practical distinction; on Mac, remember Command+W for a window and Command+Q for the application.

Closing a workbook does not delete its file. It simply closes the open document. To remove a file, you would need to delete it separately in its storage location, such as File Explorer, Finder, or OneDrive. Likewise, minimizing Excel is not the same as closing a workbook: minimizing hides the window temporarily, while the workbook remains open and available to restore.

Frequently Asked Questions

What is the shortcut to close an Excel workbook on Windows?

Press Ctrl+W or Ctrl+F4 while the workbook is active. Either closes the current workbook window. If Excel asks whether to save, choose the appropriate option before it finishes closing.

What is the shortcut to close Excel on a Mac?

Press Command+W to close the active workbook window. To quit the Excel application, press Command+Q. The app may remain open after you close its last workbook window.

Does Ctrl+W quit Excel?

No. In the Windows desktop app, Ctrl+W closes the active workbook. Excel may stay open, especially if it has no other workbook open. Use Alt+F4 to exit Excel.

How do I close Excel without saving?

Close the workbook, then choose Don’t Save in the confirmation prompt. This discards changes made since the last saved version. If AutoSave has already saved changes to a cloud-stored file, they may already be part of that file, so check the save status before relying on this choice to undo edits.

Does Command+W close an Excel workbook in a browser?

In Excel for the web, Command+W is usually a browser tab-closing shortcut, not a reliable workbook-only command. Check that the workbook has saved, then use the browser’s tab controls when leaving the page.

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.