How to Hide Rows in Excel: Keyboard Shortcuts Guide

How-to basics · Updated November 20, 2026

In Excel for Microsoft 365 on Windows, select a cell in the row or rows you want to hide, then press Ctrl+9. To select a whole row first, press Shift+Space; to hide rows on a Mac, use Command+9. The rows are hidden from view, but their contents remain in the workbook.

What You’ll Need

  • An Excel workbook in which you can edit the worksheet. You do not need to change any settings or install an add-in.
  • A keyboard. The instructions below focus on Excel for Microsoft 365 on Windows, with Mac and Excel for the web differences noted where useful.
  • The row numbers you want to hide, if you plan to select them by typing a range into the Name Box.

Step-by-Step

  1. Open the right worksheet. Open the workbook and click the worksheet tab containing the rows. If the sheet is protected, you may need permission to change its layout; a shortcut cannot override worksheet protection.
  2. Select a cell in the row. Click any cell in the row you want to hide. You do not have to select the row header first: Ctrl+9 hides the row containing the active cell. If you want to hide several rows, decide whether they are next to one another or separated.
  3. Select the entire row when you want a clear visual check. With a cell in the target row active, press Shift+Space. Excel highlights the full row, and the row number at the left is selected. On a Mac, Shift+Space also selects the row. If your computer uses that key combination for another system function, select the row number with the mouse instead.
  4. Extend the selection for adjacent rows. After selecting a row with Shift+Space, hold Shift and press the Up or Down arrow to extend the selection to neighboring rows. Check the highlighted row numbers before hiding. For example, if you want rows 12 through 15, confirm that all four row headers are selected, rather than only a cell in row 12.
  5. Alternatively, enter a row range in the Name Box. The Name Box is to the left of the formula bar. Click it, type a range such as 12:15, and press Enter. Excel selects those entire rows. This is often a convenient way to select a long range precisely, especially when it is far down the sheet. You can use this method with the keyboard by pressing Ctrl+G, typing the range in the Go To dialog, and pressing Enter.
  6. Hide the selected rows. On Windows, press Ctrl+9. On Mac, press Command+9. The selected rows disappear, and the row numbers jump over them. For example, after hiding rows 12 through 15, the visible row labels may go from 11 to 16.
  7. Hide nonadjacent rows, if needed. Select a cell in one target row, then hold Ctrl on Windows and click the other target row numbers or cells. Once the intended rows are selected, press Ctrl+9. On Mac, use Command-click to add separate selections, then press Command+9. This is useful for a few scattered rows, but verify each selection because it is easier to miss a row than with one continuous range.
  8. Use the ribbon if the shortcut is unavailable. Select the rows, then go to Home > Format > Hide & Unhide > Hide Rows. This is also a useful fallback in Excel for the web, where a browser or device may intercept a key combination. The command hides the selected rows just as the shortcut does.
  9. Confirm the result and save if appropriate. Look at the row numbers to confirm the intended range is hidden. Hiding rows changes how the sheet is displayed, not the underlying cell values or formulas. Save the workbook if you want the layout change to remain when you close it.

Common Mistakes

Selecting a cell when you meant to select multiple rows: Ctrl+9 acts on the row or rows containing the selection. If you selected only a cell in row 12, Excel hides row 12, not the neighboring rows you may have intended. For a block, select the complete row range with Shift+Space and Shift+arrow, use the row headers, or enter a range such as 12:15 in the Name Box.

Using the column shortcut by accident: Ctrl+0 hides selected columns, not rows. For rows, use Ctrl+9 on Windows. If columns disappear, select the column headers on either side and unhide them, or use the corresponding unhide command from Home > Format > Hide & Unhide.

Expecting hidden data to be deleted or protected: Hiding is only a display change. Other people may be able to unhide the rows, and formulas can still refer to their cells. Do not use Hide Rows as a privacy or security feature, and do not assume the data is excluded from calculations.

Trying to unhide a filtered row: A row removed from view by a filter is not the same as a manually hidden row. The Unhide Rows command will not restore a record that the filter excludes. Clear or adjust the filter instead.

Pressing the shortcut while editing a cell: If the insertion point is inside a cell or the formula bar, keyboard commands may edit text rather than act on the worksheet. Press Esc to leave edit mode, select the target row or cell, and try again.

Tips

  • Use the Name Box for exact ranges. Typing 25:40 selects every row from 25 through 40, including rows that are currently hidden. It is more reliable than dragging across a long stretch of row headers, and you can reuse the same technique when selecting rows to unhide.
  • Keep a note of hidden ranges. In a large model, a skipped row number can be easy to overlook. Record which rows you hid in a nearby note or worksheet documentation if other people will maintain the file.
  • Prefer grouping for sections you will repeatedly collapse and expand. Excel’s outline feature can show plus and minus controls for a row group. It is more discoverable than a manually hidden block when readers need to open and close sections regularly. Use Data > Group to create a group after selecting the rows.
  • Remember that hiding does not change totals by itself. A normal SUM formula usually includes values in manually hidden rows. If the total should respond to filtering or hidden rows, review the formula and the worksheet’s calculation needs rather than assuming a hidden row is omitted.
  • Use the ribbon path on unfamiliar keyboards. The meaning of number-row symbols can vary by keyboard layout, and some devices intercept shortcuts. Home > Format > Hide & Unhide > Hide Rows avoids uncertainty about which physical key produces the required shortcut.

Troubleshooting

Ctrl+9 does nothing: First make sure Excel, rather than a cell’s text editor, has focus. Press Esc, click a cell in the target row, and try again. Check that the sheet is not protected and that you are using the Windows shortcut in desktop Excel. On a Mac, use Command+9 instead. If a keyboard utility, remote desktop session, or browser captures the key combination, use the ribbon command.

The wrong row or only one row was hidden: Check the selected row labels before repeating the action. If you intended a block, type its full range into the Name Box, such as 8:11, press Enter, and then use the hide shortcut. If you selected nonadjacent rows, make sure each target row was added to the selection before hiding.

You cannot see how to restore the rows: For a hidden block in the middle of a sheet, select the row headers immediately above and below it. For example, if rows 8 through 11 are hidden, select rows 7 through 12, then press Ctrl+Shift+9 on Windows. On a Mac, use Command+Shift+(. The ribbon alternative is Home > Format > Hide & Unhide > Unhide Rows. If the hidden rows are at the top or bottom edge, select the whole worksheet using the corner button above row 1 and left of column A, then run Unhide Rows.

The rows still do not appear after using Unhide Rows: The rows may be excluded by a filter, or the worksheet may have an outline group collapsed. Check for filter arrows and clear or adjust the filter; check for outline controls and expand the group. Also inspect row heights: a row set to a height of zero can look hidden, so select it and use Home > Format > Row Height to enter a visible height if needed.

The shortcut behaves differently in Excel for the web: Keyboard shortcuts can depend on browser and device settings. Try the Home > Format > Hide & Unhide > Hide Rows menu path, or open the workbook in the desktop app if the shortcut is essential to your workflow.

Frequently Asked Questions

What is the keyboard shortcut to hide a row in Excel?
In Excel for Microsoft 365 on Windows, select a cell in the row and press Ctrl+9. On Mac, use Command+9. You can select the entire row first with Shift+Space if you want to check the selection.

How do I hide several rows at once with the keyboard?
Select a continuous range by selecting a row with Shift+Space and extending with Shift+Up or Shift+Down, or type a range such as 5:9 into the Name Box and press Enter. Then press Ctrl+9 on Windows or Command+9 on Mac.

Can I hide rows that are not next to each other?
Yes. Add each target row to a multiple selection by Ctrl-clicking on Windows or Command-clicking on Mac, then use the relevant hide shortcut. If the selection is hard to verify, hide each row separately or use the ribbon command.

How do I unhide rows with a keyboard shortcut?
Select the rows around the hidden range and press Ctrl+Shift+9 on Windows. On Mac, use Command+Shift+(; the exact key can depend on keyboard layout. You can also use Home > Format > Hide & Unhide > Unhide Rows.

Does hiding a row remove its values from formulas?
No. Hiding a row leaves its cell values in the worksheet, and ordinary formulas such as SUM can still include them. Hiding changes visibility; it does not delete, secure, or automatically exclude data.

Why does Unhide Rows not bring a row back?
It may be filtered out rather than manually hidden, or it may be inside a collapsed outline group. Clear or change the filter, or expand the group. If neither applies, select the surrounding row headers and use Unhide Rows, then check whether the row height is set to zero.

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.