Close Group Excel Shortcut: Close Workbooks and Rows

How-to basics · Updated November 19, 2026

In Excel for Microsoft 365 on Windows, press Ctrl+W to close the active workbook; Ctrl+F4 also closes the active workbook window. If by close group you mean ungroup selected worksheet tabs or collapse grouped rows, those are different actions: worksheet tabs have no dedicated ungroup shortcut, while outline rows can be collapsed with Excel’s outline controls.

What close group can mean in Excel

Excel uses the word group in more than one way, and it does not have one command called Close Group. A workbook can be open in a window, several worksheet tabs can be grouped so edits affect them together, and rows or columns can be grouped into an outline that can be folded away. Each situation has a different action.

Use this quick guide to identify the right one:

  • Close a workbook: press Ctrl+W or Ctrl+F4 on Windows.
  • Quit Excel completely: press Alt+F4 on Windows.
  • Ungroup worksheet tabs: select a tab outside the group or use the sheet-tab context menu.
  • Hide the detail in a row or column outline: use its minus button or the Data tab’s outline command.

It is worth checking which kind of group you have before using a shortcut. Closing a workbook is not the same as ungrouping sheets, and hiding grouped rows does not remove the group structure.

Close the active workbook on Windows

Press Ctrl+W while the workbook you want to close is active. Excel closes that workbook window, not necessarily the Excel application. Ctrl+F4 is another Windows shortcut for closing the active document window. If you have several workbooks open, use the shortcut once for each workbook you want to close, making sure the intended workbook is active first.

If the workbook has unsaved changes, Excel normally asks whether to save them. Choose Save to keep the changes, Don’t Save to discard them, or Cancel to leave the workbook open. The prompt is a safeguard, but it does not replace saving a file you need. If AutoSave is available and turned on for a file stored in OneDrive or SharePoint, changes may be saved as you work; still check the save status before closing when the work matters.

Closing a workbook may leave Excel open with its start screen or another workbook visible. That is expected: the shortcut targets the active workbook, not the whole program. If you only have one workbook open, it can look as though Excel has closed, even though the application may remain running.

Close Excel rather than just the workbook

To exit the Excel application on Windows, press Alt+F4. This is a Windows command to close the active application window. If multiple workbook windows are open, Excel may close the active one first or ask about unsaved work; check what remains open rather than assuming that one key press has saved or closed every file.

The practical distinction is simple: Ctrl+W and Ctrl+F4 close the active workbook window, whereas Alt+F4 is the usual shortcut to close the Excel application window. All three can trigger a save prompt. None of them means “ungroup sheets.” If your goal is to keep Excel open but remove a worksheet group, use the sheet-tab controls described below.

Before quitting, consider whether other workbooks are open behind the current one. A save prompt applies to the workbook named in the prompt, so read it before choosing an option. If you want to leave a workbook open for later, cancel the close prompt rather than selecting Don’t Save.

Ungroup worksheet tabs

Grouped worksheets are two or more selected sheet tabs. While the tabs are grouped, an edit made to a cell can be applied to the corresponding cell on every selected sheet. For example, if January and February are grouped and you type a heading into cell A1, both sheets can receive that heading. This is useful for consistent layouts, but it can also cause accidental changes across multiple sheets.

To end a worksheet-tab group in Windows Excel:

  1. Look at the sheet tabs at the bottom of the workbook and confirm that more than one is selected.
  2. Click a worksheet tab that is not part of the selection, if one is available. This makes that sheet active and ends the group.
  3. Alternatively, right-click one of the selected sheet tabs and choose Ungroup Sheets.

Excel does not provide a standard dedicated keyboard shortcut for the Ungroup Sheets command. The right-click menu is usually the most dependable route when all visible tabs are selected or you are unsure which tabs are in the group. In Windows, Ctrl-click can select or deselect individual tabs, and Shift-click can select a range of adjacent tabs; those actions change the selection rather than close the workbook.

Collapse a grouped row or column outline

An outline group is different from grouped worksheets. It organizes rows or columns so detail can be hidden and shown while the summary remains visible. In an outlined worksheet, use the minus sign beside a row group to hide its detail; click the corresponding plus sign to show it again. Numbered outline buttons above the row headings show different levels of detail, such as summary-only or expanded detail.

You can also select a cell in the grouped detail and choose Data > Outline > Hide Detail to collapse it, or choose Data > Outline > Show Detail to expand it. The exact command availability depends on having an outline group in the selection. The keyboard shortcuts Alt+Shift+Right Arrow and Alt+Shift+Left Arrow create and remove row or column groups, respectively; they do not mean close and open a workbook, and they are not the same as clicking the outline’s minus and plus controls.

Collapsing an outline only hides rows or columns from view. It does not delete their contents. Ungrouping removes the outline structure, but it also does not delete the underlying data. If the sheet contains important detail, check which action you intend before changing the outline.

Choose the shortcut that matches the task

These commands are easy to confuse because they all change what is visible, but they have different results. Use the following distinctions when choosing:

  • Ctrl+W or Ctrl+F4: close the active workbook window. Excel may remain open.
  • Alt+F4: close the Excel application window. Save prompts may appear.
  • Ungroup Sheets: stop edits from being applied across selected worksheet tabs. It does not close or delete any sheet.
  • Hide Detail or the minus outline button: collapse grouped rows or columns without removing their values.
  • Ungroup rows or columns: remove the outline grouping structure, while leaving the data in the cells.

For example, if the January and February sheet tabs are selected and the title bar indicates a group, use Ungroup Sheets. If a minus sign appears beside row numbers and you want to hide several detail rows, collapse that outline. If you want to stop working on the file, use Ctrl+W. The fact that all three tasks might make something disappear from view does not make their results interchangeable.

Mac and Excel for the web

In Excel for Microsoft 365 on Mac, Command+W closes the active workbook window, and Command+Q quits Excel. The Windows shortcuts Ctrl+W and Alt+F4 should not be substituted blindly on a Mac. To ungroup worksheets on Mac, use the sheet-tab context menu and choose Ungroup Sheets; the precise click gesture for selecting multiple tabs differs from Windows, where Ctrl-click and Shift-click are commonly used.

Excel for the web runs inside a browser, so closing a tab is also a browser action. Ctrl+W on Windows, or Command+W on Mac, may close the browser tab rather than behave like the desktop workbook command. Use the browser’s controls with care and confirm that edits have synced before closing the page. The desktop instructions for outline buttons and worksheet tabs generally describe the concepts, but available commands and interface details can vary in the web version.

Common problems and safe habits

If Ctrl+W appears to do nothing, first check whether a dialog box is open; Excel may be waiting for a response to a save prompt or another message. If the wrong workbook closes, it was likely the active window when the shortcut was pressed. Switch to the correct workbook and check its name before closing. When using multiple monitors or several open files, this small pause can prevent a mistaken close.

If edits suddenly appear on several sheets, check whether worksheet tabs are grouped. Undo may reverse a recent cell edit, but do not rely on it as a substitute for checking the selection before making changes. If rows vanish, look for outline symbols to the left of the row numbers; a plus sign can reveal hidden grouped detail. Also check for manually hidden rows, filters, or hidden worksheets, since they can look similar but require different commands.

A reliable close routine is to save, verify the workbook name, then use Ctrl+W to close that workbook. If your intention is to quit Excel, use Alt+F4 and respond carefully to any save prompts. If the intention is only to end a sheet group or fold away detail, do that from the worksheet tabs or outline controls instead.

Frequently Asked Questions

What is the shortcut to close an Excel workbook?
In Excel for Microsoft 365 on Windows, press Ctrl+W or Ctrl+F4 to close the active workbook window. Excel may remain open, and it may ask whether to save unsaved changes.

How do I close or ungroup a group of sheets in Excel?
Worksheet groups are not closed like workbooks. Click a tab outside the selected group or right-click a selected sheet tab and choose Ungroup Sheets. There is no standard dedicated keyboard shortcut for that command.

Does Alt+F4 close the workbook or Excel?
Alt+F4 closes the active application window, so it is the usual Windows shortcut for quitting Excel. Ctrl+W and Ctrl+F4 target the active workbook window instead. Save prompts can appear with either action.

How do I collapse grouped rows in Excel?
Click the minus button beside the outlined rows, or select detail in the group and choose Data > Outline > Hide Detail. This hides the detail; it does not delete the rows or their contents.

Will Ctrl+W close Excel for the web?
In a browser, Ctrl+W can close the browser tab rather than act like the desktop Excel workbook shortcut. Check that changes have synced, and use the browser controls carefully.

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.