How to Close an Excel Sheet with a Keyboard Shortcut

How-to basics · Updated November 20, 2026

To close the active Excel workbook in Microsoft Excel for Microsoft 365 on Windows, press Ctrl+W or Ctrl+F4. If Excel asks whether to save changes, choose Save, Don’t Save, or Cancel. These shortcuts close the workbook window, not necessarily the Excel application; use Alt+F4 only when you intend to exit Excel. You do not need to select a particular cell first.

What You’ll Need

  • A workbook open in the desktop version of Excel for Microsoft 365 on Windows.
  • A moment to check whether you want to save any changes before closing.

The word “sheet” can mean either an individual worksheet tab, such as January or Summary, or the whole workbook file. The keyboard shortcuts in this guide close the workbook window. Excel does not have a standard shortcut to close just one worksheet tab; a worksheet must instead be hidden or deleted. If you only want to stop viewing one tab, do not use the close-workbook shortcut.

Step-by-Step

  1. Make sure Excel is the active application. Click the workbook window or press Alt+Tab until it is in front. If you are editing a cell, press Enter to accept the current entry or Esc to discard that in-progress edit. This avoids mistaking an unconfirmed cell edit for a saved workbook change.
  2. Check which workbook is active. If several workbooks are open, look at the title bar and the visible sheet tabs to identify the file you mean to close. The shortcut acts on the active workbook window, not every workbook you have open. If you are unsure, switch to the intended workbook before continuing.
  3. Decide whether you need to save. Press Ctrl+S to save the current workbook before closing, or proceed and let Excel ask what to do if there are unsaved changes. Saving first is useful when you want to confirm the correct file and location. If AutoSave is on for a supported OneDrive or SharePoint file, changes may save automatically, but check the save status rather than assuming every change has finished syncing.
  4. Press Ctrl+W. Hold down Ctrl, tap W, and release the keys. This is the usual Windows shortcut for closing the active workbook window. You can also press Ctrl+F4; it closes the active workbook window as well. Use either shortcut once and wait for Excel to respond.
  5. Respond to a save prompt if one appears. Choose Save to keep the changes, Don’t Save to close without keeping them, or Cancel to leave the workbook open. If you choose Save and Excel opens a Save As dialog, enter a file name, select a location, and complete the save. Do not choose Don’t Save unless you are certain you can discard the unsaved work.
  6. Confirm that the workbook closed. If another workbook is open, Excel may bring it to the front. If no other workbook is open, Excel may show its start screen or a blank application window. In either case, the closed workbook is no longer the active window. If you meant to quit Excel entirely, use Alt+F4 after handling any open save prompts.

On a Mac: Press Command+W to close the active workbook window. If prompted, save or discard the changes as appropriate. Command+Q quits Excel, so use it only when you want to exit the application. The Windows Ctrl shortcuts described above are not the Mac equivalents.

In Excel for the web: Do not use Ctrl+W as a workbook-close command. In a browser, that shortcut generally closes the browser tab, which can make it harder to return to your work. Excel for the web commonly saves cloud-file changes automatically; check the save indicator, then navigate away using the browser or Excel interface. The desktop workbook-close shortcut applies to the installed Windows application.

Common Mistakes

  • Confusing a worksheet with a workbook. A workbook is the Excel file; it can contain many worksheet tabs. Ctrl+W closes the workbook window, including all its tabs, rather than closing only the selected tab. If you wanted to remove a worksheet tab, first make sure that is truly your goal: deleting a sheet can remove its contents. To keep its data but remove it from view, use the sheet-tab context menu and choose Hide.
  • Pressing Alt+F4 by habit. This shortcut closes the Excel application, not just the active workbook. It may prompt about unsaved changes in one or more open workbooks. Choose Ctrl+W when you want to close one workbook and keep working in Excel.
  • Choosing Don’t Save without checking. That option discards changes made since the last save. If you are unsure, choose Cancel, review the workbook, and save a copy or save the file before closing. Cancel is the safe choice when you cannot tell which version contains the work you need.
  • Using a browser shortcut in Excel for the web. Ctrl+W usually closes the browser tab on Windows, while Command+W typically closes a tab or window on a Mac. These are browser actions, not reliable workbook-close commands in Excel for the web. Check the save status before leaving the page.
  • Expecting the whole Excel window to disappear. Closing a workbook does not necessarily quit Excel. The application can remain open with another workbook, the start screen, or a blank window visible. That is normal and does not mean Ctrl+W failed.

Tips

  • Save before closing important work. Ctrl+S is a quick way to save the active workbook on Windows. On Mac, use Command+S. If the workbook has never been saved, Excel will ask you to choose a name and location. For important changes, wait until the save completes before closing.
  • Use the title bar to identify files. When several workbooks are open, their names may be similar. Check the active title bar before pressing Ctrl+W. If you are switching among windows, use Alt+Tab on Windows; on Mac, use Command+Tab to switch applications or the Window menu to select an Excel workbook.
  • Remember the difference between closing and quitting. Ctrl+W closes the active workbook; Alt+F4 exits Excel on Windows. On Mac, Command+W closes a window and Command+Q quits the app. This distinction is especially helpful when you want to close one client file but continue working in another.
  • Know what happens to cloud files. AutoSave can save supported files stored in OneDrive or SharePoint as you work, but it is not a reason to ignore a visible sync or error message. If the status says the upload is pending or has failed, keep the workbook open and resolve the issue before leaving if you need the latest changes available elsewhere.
  • Use the mouse if a shortcut is intercepted. In desktop Excel, you can close the workbook window with the window’s Close button. Depending on your setup and open windows, that may close a workbook or the last Excel window. Read any save prompt carefully, just as you would after using the keyboard.

Troubleshooting

Ctrl+W seems to do nothing. Confirm that the desktop Excel workbook is active and that you are not typing into a cell or another dialog. Click the workbook area, then try Ctrl+W again. If your keyboard has a special function-key or system setting that changes key behavior, try Ctrl+F4 or use the workbook window’s Close button.

A save dialog appears instead of closing. Excel is asking where to save a new workbook or a copy. Enter a file name, choose the correct folder or cloud location, and complete the dialog. If you did not intend to save a separate copy, cancel the dialog and check whether you opened the original file or selected Save As by mistake. The workbook will remain open until you finish saving or cancel.

The workbook reappears or another file opens. Excel may have switched to another open workbook, or you may have closed one window while additional windows remain. Check the title bar and taskbar or Dock to see which files are still open. Repeat Ctrl+W only after confirming that the workbook now on screen is the one you want to close.

You lost changes after choosing Don’t Save. That choice closes the file without retaining unsaved edits. If the workbook is stored in OneDrive or SharePoint, check its version history or the file’s recovery options; an earlier saved version may be available, but unsaved changes are not guaranteed to be recoverable. For a local file, reopen it and check Excel’s Document Recovery pane if it appears. Save important work before closing in the future.

Ctrl+W closes the browser tab. You are probably using Excel for the web rather than the Windows desktop application. Reopen the workbook from its OneDrive, SharePoint, or Microsoft 365 location if needed. Before closing the tab, check that the page indicates your changes are saved; avoid relying on a desktop Excel shortcut inside a browser.

Frequently Asked Questions

What is the shortcut to close an Excel workbook on Windows?
In desktop Excel for Microsoft 365, press Ctrl+W. Ctrl+F4 also closes the active workbook window. Handle any save prompt before moving on.

What is the Excel close shortcut on a Mac?
Press Command+W to close the active workbook window. Use Command+Q only if you want to quit Excel entirely.

Does Ctrl+W close Excel completely?
Usually, it closes the active workbook, not the application. Excel can stay open with other workbooks or its start screen. Alt+F4 is the Windows shortcut for exiting the app.

Can I close only one sheet tab with a shortcut?
Not with Ctrl+W; that closes the workbook window. Excel has no standard keyboard shortcut for closing one worksheet tab. To keep a tab’s data but remove it from view, right-click its tab and select Hide.

Will closing a workbook save it automatically?
Not necessarily. Excel may ask whether to save changes. Choose Save if you need to keep them. AutoSave can save supported cloud workbooks, but check the save or sync status before closing.

Why does Excel ask whether I want to save?
The workbook has changes Excel believes have not been saved. Select Save to keep them, Don’t Save to discard them, or Cancel to return to the workbook and decide later.

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.