How to Close an Excel Sheet With the Keyboard Quickly

How-to basics · Updated November 20, 2026

In Excel for Microsoft 365 on Windows, press Ctrl+W to close the active workbook, or press Ctrl+F4 to do the same. Excel may ask whether to save changes before closing. A worksheet tab cannot be closed on its own: if you mean the whole workbook, use the shortcut; if you mean one tab, leave it open, hide it, or delete it instead.

It helps to know which thing you want to close. A workbook is the entire Excel file, usually ending in .xlsx, and can contain many worksheets. A worksheet is one tab within that file. Closing a workbook does not normally quit Excel, while quitting Excel closes the application. The steps below focus on the Windows desktop app and explain the differences for Mac and Excel for the web.

What You’ll Need

  • An open Excel workbook, with the workbook you want to close active.
  • A keyboard. You do not need to click a worksheet tab first; the shortcut applies to the active workbook.
  • A moment to decide whether any unsaved changes should be kept. If you are unsure, save before closing.

Step-by-Step

  1. Check that the right workbook is active. Look at the title bar at the top of Excel and confirm the file name. If several workbooks are open, click inside the one you intend to close before using a shortcut. The active workbook is the one the command will affect; a different workbook may remain open behind it. If you are working with sensitive or important changes, note the file name before continuing.
  2. Save first if you want to keep your latest edits. Press Ctrl+S on Windows. If the file is new, Excel may ask you to choose a name and location; complete that prompt before closing. Saving first is optional because Excel can ask about unsaved edits when you close, but it gives you a chance to confirm the save location and filename rather than making that decision in a closing prompt.
  3. Close the active workbook. Press Ctrl+W. This closes the current workbook window or document, not just the worksheet tab selected at the bottom. As an alternative in desktop Excel for Windows, press Ctrl+F4; it also closes the active workbook. Choose either shortcut, not both. If more than one workbook is open, Excel should leave the others available.
  4. Respond to a save prompt carefully. If Excel detects changes that have not been saved, it asks whether to save them. Choose Save to keep the edits, Don’t Save to discard them, or Cancel to stop closing and return to the workbook. Use Tab or Shift+Tab to move between buttons if needed, then press Enter to activate the highlighted choice. Read the selected option before pressing Enter; choosing Don’t Save can permanently lose your unsaved work.
  5. Confirm that the workbook has closed. The workbook window disappears or Excel shows its start screen, another open workbook, or a blank application window. If another workbook is open, it may become the one in front. Check the title bar again if you are unsure. You can use Ctrl+W again to close another active workbook, but first verify that it is the file you mean to close.
  6. Quit Excel only if that is your goal. To close the Excel application on Windows, press Alt+F4 while Excel is active. This is different from Ctrl+W: Alt+F4 attempts to exit Excel itself and may close multiple open workbooks, prompting you to save any that need it. If you only want to close one file and keep Excel available, use Ctrl+W or Ctrl+F4 instead.

On Mac: With Excel active, press Command+W to close the current workbook. To quit Excel, use Command+Q. Mac save prompts also let you save, discard, or cancel; check the highlighted button before confirming. Keyboard layouts and function-key settings can vary, so Command+W is the simplest workbook-closing shortcut to try.

In Excel for the web: The workbook is open in a browser tab, and Ctrl+W on Windows or Command+W on Mac generally closes that browser tab, not a workbook window inside the desktop app. Excel for the web saves changes to OneDrive or SharePoint as you work, but wait for its saved or synced status before closing the tab. If you want to keep the browser open, use the browser’s navigation controls to return to your file list rather than using the tab-closing shortcut.

Common Mistakes

  • Confusing a worksheet with a workbook. Excel does not have a command to close just one worksheet while keeping the same workbook open. Ctrl+W closes the entire workbook, including all its tabs. If you only need to remove a tab from view, hide that worksheet; if you want to remove it permanently, delete it only after checking that you no longer need its contents.
  • Using Alt+F4 when you mean to close one file. Alt+F4 is the Windows command to close the active application. If Excel has several workbooks open, it may start closing the application and require you to handle prompts for more than one file. Ctrl+W or Ctrl+F4 is the more targeted choice for one workbook.
  • Assuming a prompt means the file is already saved. A save prompt means Excel needs your decision about changes. Choosing Cancel keeps the workbook open; choosing Don’t Save discards the pending edits. If you are uncertain which version is on disk, cancel, save, and then close again.
  • Pressing a shortcut while another window has focus. A cell-editing box, file dialog, or another application may be active instead of the workbook. In that case, the shortcut may edit text, close a dialog, or do something unrelated. Click the worksheet area or use Esc to leave a dialog when appropriate, then try the workbook shortcut again.
  • Using Ctrl+W in a browser without checking the app. In Excel for the web, it usually closes the browser tab. Desktop Excel and the web app behave differently because the browser owns the tab. Confirm whether you are in the desktop program or a browser before using the shortcut.

Tips

  • Save before closing important work. Ctrl+S makes the save decision explicit and gives Excel time to finish writing the file. For cloud files, wait until Excel indicates that changes are saved or synced. A brief pause is especially useful after pasting data, importing a file, or making a large set of edits.
  • Use the title bar as a safety check. When several files are open, workbook windows can look alike. Verify the file name before closing, and check it again after switching to another workbook. This simple pause helps prevent closing a report or template you still need.
  • Remember that the shortcut closes the active file, not the whole group. If multiple workbooks are open, repeat Ctrl+W only after checking which workbook has focus. If your goal is to close everything and leave Excel, use Alt+F4 on Windows or Command+Q on Mac, and respond to each save prompt individually.
  • Use the menus if you forget the shortcut. In the Windows desktop app, open File and choose Close to close the active workbook. This is distinct from choosing Exit, which closes Excel. Menu wording and layout can vary slightly across platforms, but the close-versus-quit distinction remains useful.
  • For a single worksheet, choose the right alternative. To switch away from a tab using Windows keyboard navigation, press Ctrl+Page Up or Ctrl+Page Down to move between worksheets. To hide a tab, use the worksheet’s context menu or the Home ribbon’s Format options; to delete one, use the sheet’s context menu and confirm only if you are certain. Hiding preserves the tab’s data, while deletion removes that worksheet from the workbook.

Troubleshooting

The shortcut does nothing. First check that Excel is the active application and that a dialog is not in front of the workbook. Click a cell, then try Ctrl+W again. If your keyboard has an Fn layer or a nonstandard layout, Ctrl+F4 may require an Fn key; use Ctrl+W or choose File > Close in desktop Excel. On a Mac, use Command+W rather than the Windows shortcut.

The wrong workbook closed. If another workbook is still open, use its title bar to identify it and reopen the intended file from its recent files or saved location. If you closed without saving, Excel may not be able to restore the discarded edits. Check whether AutoRecover or version history is available, especially for a file stored on OneDrive or SharePoint. Before reopening, avoid making changes to a similarly named file by mistake.

Excel asks whether to save, but you do not know what changed. Choose Cancel to return to the workbook, then inspect the relevant sheets and save a copy if you need to preserve the current state. You can compare the file with an earlier version or use Undo while the workbook remains open, but do not choose Don’t Save unless you are willing to lose all unsaved changes. If Excel marks a workbook as read-only, you may need to use Save As to keep edits in a new file.

The save prompt will not go away or the file is taking time to save. Wait briefly and look for an error message, a progress indicator, or a cloud-sync warning. If the file is on a shared drive or in the cloud, a network delay can prevent saving immediately. Cancel the close if possible, then try Ctrl+S again once the connection is available. Do not force-quit Excel while it is still writing a file unless the application has stopped responding and you accept the risk of losing recent changes.

You meant to close a tab, not the file. If you have not closed the workbook yet, press Cancel on any save prompt and leave the workbook open. Excel cannot close one worksheet in isolation. Switch to another tab, hide the one you do not want to see, or delete it if removal is intended. If you already closed the workbook, reopen it; the worksheet tabs will be inside the file as before unless you chose to delete a sheet and saved that change.

Ctrl+W closes your browser tab. That is expected in Excel for the web. Reopen the tab from browser history if needed, and allow the workbook to finish syncing before you close it again. For a workbook-only close shortcut, open the file in the desktop Excel application and use Ctrl+W on Windows or Command+W on Mac.

Frequently Asked Questions

What is the keyboard shortcut to close an Excel workbook on Windows?
Press Ctrl+W or Ctrl+F4 in the desktop version of Excel. Both close the active workbook. Excel may ask you to save changes first.

Does Ctrl+W close Excel completely?
No. It closes the active workbook. Excel usually stays open, and any other open workbooks remain available. Use Alt+F4 to quit Excel on Windows, or Command+Q on Mac.

Can I close just one worksheet with a keyboard shortcut?
No. A worksheet is a tab within a workbook, and Excel does not close individual tabs. Switch to another sheet, hide the tab, or delete the worksheet if you intend to remove it.

How do I close an Excel file without saving?
Use Ctrl+W on Windows or Command+W on Mac, then choose Don’t Save when Excel asks. This discards unsaved changes, so choose Cancel instead if you are not sure.

What does Ctrl+W do in Excel for the web?
It normally closes the browser tab, because the workbook is running inside the browser. Wait for the saved or synced status before closing the tab, or use browser navigation to return to your file list.

How do I close a workbook and keep Excel open?
Use Ctrl+W or Ctrl+F4 on Windows, or Command+W on Mac. Avoid Alt+F4 on Windows and Command+Q on Mac, because those commands quit the application rather than simply closing one workbook.

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.