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 365 for Windows, press Ctrl+W. On a Mac, press Command+W. Excel may ask whether to save unsaved changes; choose Save, Don’t Save, or Cancel as appropriate. These shortcuts close the workbook, not just one worksheet tab, so first check which file is active.

What You’ll Need

  • Excel for Microsoft 365 on Windows, or Excel for Mac if using a Mac.
  • An open workbook. If it contains changes you want to keep, save them before closing.
  • A keyboard, or access to the Excel ribbon if you prefer to use a menu instead of a shortcut.

You do not need to select a cell or worksheet before closing. Excel closes the workbook that is currently active. If you are using Excel in a web browser, the shortcut may close the browser tab instead; see the notes below.

Step-by-Step

  1. Check which workbook is active. Look at the title bar at the top of the Excel window and confirm that it shows the file you intend to close. If you have several workbooks open, click inside the one you want to close. The active window is the one that receives the shortcut. This quick check helps prevent closing a different workbook by mistake.
  2. Save any changes you want to keep. Press Ctrl+S on Windows, or Command+S on Mac. You can also select File > Save. If the workbook has never been saved, Excel opens a Save As dialog. Choose a folder, enter a file name, and complete the save before continuing. If you do not want to keep the recent edits, you can skip this save and choose Don’t Save when Excel asks.
  3. Close the workbook on Windows. With the target workbook active, press Ctrl+W. This closes the active workbook window. You can also use Ctrl+F4 to close the active workbook window. Both are workbook-closing shortcuts; they are not commands to delete or hide the worksheet currently selected.
  4. Close the workbook on Mac. Press Command+W while the workbook is active. This closes its window. If there are unsaved changes, respond to Excel’s prompt before the window closes. The Windows combination Ctrl+W is not the Mac equivalent; use the Command key.
  5. Choose what to do if Excel asks about saving. Select Save to keep the edits, Don’t Save to discard them, or Cancel to return to the workbook without closing it. Read the prompt carefully, particularly if the workbook contains changes made since your last save. Cancel is the safe choice if you are unsure.
  6. Confirm that the workbook closed. If another workbook is open, Excel may bring that window forward. If none is open, Excel may show its start screen or remain open without a workbook, depending on your setup. The Excel application does not necessarily quit when you close a workbook. To close the application on Windows, use Alt+F4; on Mac, choose Excel > Quit Excel or press Command+Q.

If you use Excel for the web, you are working in a browser tab rather than a separate desktop workbook window. The browser’s Ctrl+W on Windows or Command+W on Mac generally closes the current tab, not an Excel worksheet. Excel for the web saves changes to OneDrive or SharePoint automatically as you work, but check that the save indicator has finished before closing the tab. If you only want to leave the file open in another tab, switch tabs rather than using the close shortcut.

The word sheet is often used casually to mean an entire Excel file, but Excel distinguishes a workbook from a worksheet. A workbook is the file; a worksheet is one tab inside it. The shortcuts above close the workbook window. Excel does not have a standard shortcut that simply closes one worksheet while leaving the same workbook open. To remove a worksheet, use its tab’s context menu and choose Delete, but that deletes the sheet and its contents rather than closing it.

Common Mistakes

  • Confusing a worksheet with a workbook. Pressing Ctrl+W closes the workbook window, which can contain many worksheet tabs. It does not close only the selected tab. If your goal is to stop viewing one tab, select a different worksheet instead of closing the workbook.
  • Using Alt+F4 when you only mean to close a file. This Windows shortcut closes the active application window and may exit Excel if no other workbook window is open. Use Ctrl+W for the workbook, and reserve Alt+F4 for when you intend to close Excel or its active window.
  • Choosing Don’t Save without checking. That option discards changes made since the last save. If you are not certain which edits are new, select Cancel, review the workbook, and save a copy or save the current file before closing.
  • Pressing the Windows shortcut in Excel for the web. A browser can interpret Ctrl+W as a request to close its current tab. In the web version, check the save status and treat this as a browser-tab shortcut, not as a command for a particular worksheet.
  • Assuming the workbook is gone because Excel is still open. Excel can remain running after a workbook closes, especially if another file is open. Check the workbook title or window rather than expecting the whole program to disappear.

Tips

  • Use the ribbon when you want a visible command. In desktop Excel for Windows, select File > Close to close the active workbook. If there are unsaved changes, handle the resulting prompt. This is useful when you cannot remember the shortcut or want to verify the command before choosing it.
  • Save first when the workbook matters. Pressing Ctrl+S before Ctrl+W makes the sequence predictable. If the file is stored in OneDrive or SharePoint, allow the save or sync indicator to finish, especially before closing the last open window.
  • Keep both shortcuts straight. Think of Ctrl+W as closing the workbook and Alt+F4 as closing the Windows application window. On Mac, Command+W closes a window, while Command+Q quits Excel.
  • Use Cancel as a pause button. A save prompt does not require an immediate decision. Choose Cancel if you need to inspect a formula, compare the file with another version, or confirm whether an edit should be kept.
  • Check for more than one open workbook. After the active file closes, another Excel window may appear. Before repeating the shortcut, check its title bar: the next press will close the newly active workbook.

Troubleshooting

Nothing happens when you press the shortcut. First click inside the Excel workbook so it has focus, then press the keys together rather than one after another. On Windows, use the Ctrl key, not the Windows key; on Mac, use Command. If a menu, dialog, or cell-editing mode is active, finish or dismiss it and try again. You can use File > Close in desktop Excel for Windows as an alternative.

The wrong workbook closes. Excel applies the shortcut to the active window, which may not be the workbook you were looking at moments earlier. If you closed the wrong file and Excel offers a save prompt, choose Cancel to keep it open. If it closed without a prompt, reopen the file from File > Open or its saved location. Recent saved work should still be there; unsaved changes may not be recoverable.

You see a save prompt and are unsure what to choose. Choose Cancel to return to the workbook. Then use Ctrl+S on Windows or Command+S on Mac if you want to keep the current edits. If you want to preserve the original and save a separate version, use File > Save As and save under a different name. Choose Don’t Save only when you are comfortable losing the changes made since the last save.

The browser tab closes instead of an Excel file window. You are likely using Excel for the web. Reopen the tab from your browser history if needed, then verify the workbook’s save status. Browser recovery and tab-reopen options vary, so do not rely on them as a substitute for saving. For a desktop-style workbook shortcut, open the file in the Excel desktop app if your account and device provide that option.

Excel closes completely. If you pressed Alt+F4 on Windows or Command+Q on Mac, you used the quit or application-closing command rather than the workbook-only command. Start Excel again and reopen the file. To close only a workbook next time, use Ctrl+W on Windows or Command+W on Mac.

Frequently Asked Questions

What is the shortcut to close an Excel workbook on Windows?
Press Ctrl+W while the workbook is active. Ctrl+F4 also closes the active workbook window. Save first if you want to keep your edits.

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

Does Ctrl+W close just the current sheet tab?
No. It closes the active workbook window, including all of its worksheet tabs. To change sheets, click another tab; to remove a sheet, use the tab’s Delete command, knowing that this deletes its contents.

Will closing a workbook automatically save it?
Not always. Desktop Excel normally prompts you when there are unsaved changes. Choose Save to keep them, Don’t Save to discard them, or Cancel to stay in the workbook. In Excel for the web, check the cloud save indicator before closing the browser tab.

How do I close the Excel workbook but keep Excel open?
Use Ctrl+W on Windows or Command+W on Mac. Excel can remain open with another workbook or its start screen visible. Avoid the application quit command if you want Excel to stay running.

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.