Close Excel Without a Mouse Using Keyboard Shortcuts

How-to basics · Updated November 20, 2026

To close the Excel desktop app on Windows without a mouse, press Alt+F4. If a workbook has unsaved changes, use the keyboard to choose whether to save, discard, or cancel. If you only want to close the current workbook and leave Excel open, press Ctrl+W instead. Save important changes before choosing to discard them.

What You’ll Need

  • A keyboard connected to your computer and Microsoft Excel for Microsoft 365 on Windows.
  • Know whether you want to close just the current workbook or quit Excel completely.
  • If you have unsaved work, decide whether you want to save it before closing.

You do not need to change an Excel setting or install anything. These instructions are for the Windows desktop app. Excel for Mac and Excel for the web behave differently in some cases, as noted below.

Step-by-Step

  1. Make sure Excel is the active app. If you can see the Excel window, click is not needed: press Alt+Tab until Excel is selected, then release the keys. Check that the workbook you mean to close is the one shown. This matters if you have multiple workbooks or other apps open, because Alt+F4 acts on the active window, not necessarily on Excel.
  2. Choose whether to close a workbook or quit Excel. To close only the active workbook, press Ctrl+W. The workbook closes, but Excel may stay open with another workbook or its start screen. To quit the Excel app, press Alt+F4. If your goal is to close every open workbook and the app, use Alt+F4 on each workbook window as needed until Excel quits.
  3. Save first if you want to keep your latest changes. Press Ctrl+S before closing. If the workbook has already been saved, Excel updates that file. If it has never been saved, Excel opens a save dialog. Type a file name, use Tab to move between available controls, and press Enter to activate the selected control. Check the folder or location shown so you know where the file will be saved.
  4. Close the workbook or app with the appropriate shortcut. Press Ctrl+W to close the current workbook, or Alt+F4 to close the active Excel window. If you chose Ctrl+W and Excel remains open, that is expected; use Alt+F4 afterward if you also want to quit the app.
  5. Handle the save-changes prompt if it appears. When Excel asks whether to save changes, do not press Enter automatically: the selected button may be Save. Press Tab or Shift+Tab to move between buttons, and read the highlighted choice. Press Enter when the choice you want is selected. Choose Save to keep edits, Don’t Save to discard them, or Cancel to return to the workbook. The exact wording or button order can vary.
  6. Confirm the result. If you chose to quit Excel, the Excel window should disappear. If you chose Ctrl+W, Excel may show its start screen or another open workbook. If a save dialog or prompt remains, finish or cancel that dialog rather than repeatedly pressing the close shortcut.

On some laptops, the function row has special media or system actions. If Alt+F4 does not work, try holding the laptop’s Fn key as well, for example Alt+Fn+F4. The exact key combination depends on the laptop’s keyboard settings; check its keyboard guide if needed. Do not assume Excel has closed just because the screen changed—verify that you are no longer looking at an Excel window.

Common Mistakes

  • Using Ctrl+W when you mean to quit Excel. Ctrl+W normally closes the active workbook, not necessarily the application. Excel can remain open, especially if other workbooks are open. Use Alt+F4 to close the app window.
  • Using Alt+F4 while another app is selected. The shortcut closes the active window. If you switched to a browser, document, or dialog by mistake, that is what the shortcut may close. Use Alt+Tab to check which app is active first.
  • Choosing Don’t Save without checking. This discards unsaved changes to the workbook. It is not the same as saving a copy, and the discarded edits may not be recoverable. If you are unsure, choose Cancel, return to Excel, and save with Ctrl+S.
  • Pressing Enter without checking the prompt. Enter activates whichever button currently has focus. The default choice is often Save, but focus can change. Use Tab or Shift+Tab and check the highlighted button before confirming.
  • Confusing a closed workbook with a closed app. Excel may continue running at its start screen after a workbook closes. If you need the app to exit, press Alt+F4 again while Excel is active.

Tips

  • Use Ctrl+S before Alt+F4 as a reliable routine. It makes your intention to keep recent changes explicit. If a save dialog appears, complete it before trying to close Excel.
  • Use Cancel when you are uncertain. Cancel returns you to the workbook so you can inspect it, save it, or decide what to do. It is safer than guessing between Save and Don’t Save.
  • Keep track of multiple open workbooks. Excel can have several windows open. Ctrl+W closes the active workbook, so confirm the workbook name or contents before using it. Alt+Tab can help you check the active app, but it does not choose between workbook windows inside Excel.
  • Remember the Mac equivalents. In Excel for Mac, press Command+Q to quit Excel and Command+W to close the current workbook window. Save with Command+S. Mac prompts can have different button layouts, so check the selected option before confirming.
  • Be careful in Excel for the web. It runs in a browser, so Ctrl+W generally closes the browser tab, not just an Excel workbook. The file usually saves changes to OneDrive or SharePoint automatically, but wait for the save indicator to finish before closing the tab. Browser behavior and shortcuts can vary.

Troubleshooting

Alt+F4 does nothing. First check that Excel is the active window with Alt+Tab. On a laptop, try Fn+Alt+F4 if the function keys control hardware features. If Excel is in the middle of editing a cell or showing a menu, press Esc once to dismiss that mode, then try the close shortcut again. If a dialog is open, deal with that dialog first.

A save prompt appears, but the keys seem to do the wrong thing. Use Tab to move focus through the available buttons and Shift+Tab to move backward. Look for a visible outline or highlight to identify the selected button, then press Enter. If you cannot tell which option is selected, press Esc or choose Cancel if it is clearly available, return to the workbook, and save with Ctrl+S before closing again.

A Save As dialog opened and you did not mean to save a new file. This can happen when you use Ctrl+S on a workbook that has not been saved before. To continue, enter a file name and complete the save. To back out, press Esc to cancel the dialog and return to Excel; this does not close the workbook. Then decide whether to save it or close it without saving.

Excel appears frozen or says Not Responding. Wait briefly, especially if the workbook is large or Excel is processing a task. Pressing Alt+F4 repeatedly will not make an unresponsive workbook finish faster. If the app remains stuck, open Task Manager with Ctrl+Shift+Esc, select Microsoft Excel, and choose End task only as a last resort. Any unsaved work may be lost. Reopen Excel afterward and check for Document Recovery or AutoRecover files, but do not assume every recent edit will be recovered.

Excel stays open after the workbook closes. That is normal after Ctrl+W if Excel has no workbook window to show or has other windows open. Press Alt+Tab to return to Excel, then press Alt+F4 to quit it. If a prompt appears, complete it rather than switching away and assuming the app has exited.

The shortcut closes the wrong thing. If the active window was a different application, Alt+F4 may close that app. If you are in a browser running Excel for the web, Ctrl+W may close the tab. Reopen the intended app or tab if needed, and confirm whether your file saved before trying again.

Frequently Asked Questions

What is the quickest way to quit Excel on Windows?
Make Excel active and press Alt+F4. If there are unsaved changes, respond to the save prompt before the app closes.

Does Ctrl+W close Excel completely?
Usually it closes the current workbook. Excel may remain open with another workbook or its start screen. Use Alt+F4 to quit the app.

How do I close Excel without saving?
Press Alt+F4, then use Tab or Shift+Tab to select Don’t Save and press Enter. This discards unsaved changes, so use it only when you are sure you do not need them.

Can I save and close Excel using only the keyboard?
Yes. Press Ctrl+S, complete any save dialog with the keyboard, then press Alt+F4. If a save-changes prompt appears, select the appropriate option with Tab and press Enter.

What are the Mac shortcuts for closing Excel?
Command+Q quits Excel for Mac, while Command+W closes the active workbook window. Command+S saves the workbook. Check any prompt before confirming.

Does Alt+F4 work in Excel for the web?
Excel for the web is inside a browser, so Alt+F4 may close the browser window rather than act like closing the Windows desktop app. Use the browser’s normal tab controls and wait for the file’s save indicator before leaving.

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.