Excel Shortcut to Hide Rows on Windows and Mac: Quick Guide

How-to basics · Updated November 3, 2026

Excel Shortcut to Hide Rows on Windows and Mac: Quick Guide

In Excel for Microsoft 365 on Windows, select a cell in the row or rows you want to hide, then press Ctrl+9. On a Mac, use Command+9. The rows disappear from view but remain in the worksheet; to show them again, select the rows on both sides and use the unhide shortcut or Excel’s Format menu.

The Windows shortcut and what it hides

Ctrl+9 hides the selected row or rows. You do not have to select the row headers: selecting a cell, or a range of cells, is enough. Excel hides every entire worksheet row that intersects the selection. For example, if you select cells B6:D8 and press Ctrl+9, rows 6, 7, and 8 are hidden across the whole worksheet, not just in columns B through D.

If you prefer to select row headers, click the number 6 at the left of the grid to select row 6, or drag across several row numbers, then press Ctrl+9. To select rows that are not next to each other, hold Ctrl while clicking their row headers, then use the shortcut. Hiding is a view and layout change; it does not delete the cells or their contents.

On many keyboards, the 9 key in the main number row is the simplest one to use. If the shortcut does not respond, make sure the worksheet grid has focus rather than a cell being edited, and try the number-row key rather than the numeric keypad. Keyboard layouts and browser-reserved shortcuts can affect how a key combination behaves.

How to hide a row with the ribbon

The ribbon provides a useful alternative when you cannot remember the shortcut or are working on a device where keyboard combinations behave differently. Select a cell in the row, or select the rows by their row numbers, then choose Home > Cells > Format > Hide & Unhide > Hide Rows. Excel hides the complete selected rows.

This menu route is also helpful for people using Excel for the web, where a browser or keyboard layout may interfere with a shortcut. The command is available from the Home tab’s Format menu. You can also right-click a selected row number and choose Hide from the context menu. The context-menu option is convenient when selecting rows directly, while the ribbon path is easier to follow in instructions or when the context menu is crowded.

Hiding a row does not change the order of the remaining rows. If row 7 is hidden, the visible row labels go from 6 to 8. Excel preserves the original row numbers, formulas, formatting, and values, which is why hiding is useful for temporarily simplifying a view without rearranging data.

How to unhide rows

To unhide a row with the keyboard on Windows, select the row immediately above and the row immediately below the hidden one, then press Ctrl+Shift+(. On a Mac, the equivalent is generally Command+Shift+(. The opening parenthesis is shown in Microsoft’s shortcut notation; on many keyboards it is typed with Shift and the 9 key. If that combination is awkward or does not work with your keyboard layout, use the ribbon instead.

For the ribbon method, select the rows that border the hidden area, then choose Home > Cells > Format > Hide & Unhide > Unhide Rows. For example, if row 7 is hidden, select row headers 6 and 8, then choose Unhide Rows. If several consecutive rows are hidden, selecting the visible row above and the visible row below the whole hidden block will reveal the block.

If the first or last worksheet row is hidden, there may be no visible row on one side to select. In that situation, select the whole sheet by clicking the triangle at the intersection of the row and column headers, then use the Unhide Rows command. Another option is to enter a hidden row’s address in the Name Box, at the left of the formula bar, and then use the Format menu. This can help when the hidden area is large or difficult to target.

Mac and Excel for the web differences

On Excel for Mac, the row-hiding shortcut is Command+9, rather than Windows’ Ctrl+9. To unhide, use Command+Shift+( where supported by the keyboard layout. Menu labels and their location can vary somewhat between Excel releases, but the Home tab’s Format menu includes the Hide & Unhide commands. If a shortcut is not recognized, use that menu or the right-click menu rather than assuming the row has been hidden.

Excel for the web can also offer keyboard shortcuts, but the browser may reserve certain combinations or handle them differently. The ribbon command Home > Format > Hide & Unhide > Hide Rows is a dependable fallback when the shortcut fails. The same basic idea applies in the desktop app and web version: select the relevant row or cells first, then apply Hide Rows.

These shortcuts are for rows, not columns. In Windows Excel, Ctrl+0 hides selected columns; on Mac, the corresponding shortcut is generally Command+0. If the goal is to hide columns, select the column or cells in it and use the column command, or choose Hide Columns from the Format menu. Using Ctrl+9 when you meant to hide a column will affect rows instead.

Why a row may not hide or reappear

When Ctrl+9 appears to do nothing, check the selection and the active state of Excel first. If you are typing inside a cell or editing text in the formula bar, the keystroke may be treated as part of the edit instead of a worksheet command. Press Enter or Esc to finish editing, click a cell in the target row, and try again. If a shortcut is intercepted by a browser or another utility, use the ribbon or right-click menu.

On a protected worksheet, Excel may prevent changes to row formatting, including hiding or unhiding, depending on the protection settings. If you have permission, review Review > Unprotect Sheet or ask the workbook owner to allow the relevant action. Do not remove protection if you are not authorized to change the sheet. Workbook structure protection is a separate setting and is more commonly associated with adding, deleting, moving, or renaming sheets than with hiding an individual worksheet row.

If the row numbers skip, but the row is not hidden after using the shortcut, a filter may be excluding records. Check the filter arrows in the header row and clear or adjust the filter to bring matching records back. A filtered-out row is not the same as a manually hidden row: filtering displays records according to criteria, while Hide Rows changes the row’s visibility directly.

Another possibility is that a row’s height has been set to zero or an extremely small value. Select the rows around it and use Home > Cells > Format > AutoFit Row Height, or open the row-height command and enter a suitable height. This restores visibility when the problem is row height rather than a conventional hidden-row setting.

Hidden rows, filters, and outline groups

Manually hiding rows works well for a small number of rows that you want to omit temporarily, such as notes, helper calculations, or a detail section in a report. It is not always the best tool for a large data table. If you need to show only records that meet a condition, use Data > Filter and filter the relevant column. A filter is easier to update as data changes and makes it clear that records are being excluded by a criterion.

For rows that users should expand and collapse as a section, consider an outline group. Select the rows and use Data > Group. Excel adds outline controls, usually displayed beside the row numbers, so a reader can collapse or expand the group. A group is different from manually hiding rows: it provides an explicit control for the hidden detail and is useful in subtotal reports or worksheets with sections.

Neither hiding nor grouping is a privacy feature. Hidden values can still be revealed by unhiding rows, and they may remain visible to someone who can inspect or copy the workbook. If information must not be shared, remove it from the distributed file or use an appropriate access-control approach; simply hiding rows does not secure the data.

Practical examples and a safe workflow

Suppose a monthly report has transaction details in rows 10 through 35 and a summary above them. Select any cell in rows 10 through 35, or select row headers 10 to 35, and press Ctrl+9 on Windows. The summary remains visible while the detail stays in the sheet. Later, select the visible row immediately above and below the block and use Ctrl+Shift+(, or use the Unhide Rows menu command, to restore it.

For a worksheet with several unrelated helper rows, select each row header while holding Ctrl, then press Ctrl+9. Check the row-number sequence afterward: a jump in the labels indicates hidden rows. This quick check is useful before sharing a workbook, because an apparently missing result may simply be located in a hidden row.

  • Use Hide Rows for a temporary, manually chosen set of rows.
  • Use Filter when records should appear or disappear according to data values.
  • Use Group when readers need a visible expand-and-collapse control for a section.
  • Use row height or formatting controls if the row is present but its contents are not visible as expected.

Before distributing a workbook, consider whether the hidden information should be present at all. Hiding can make a sheet easier to read, but it does not remove formulas or data, and a recipient can often restore the rows. For a cleaner presentation, document why rows are hidden or provide a separate report sheet with only the intended content.

Frequently Asked Questions

What is the 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. The shortcut hides the entire row, even if you selected only one cell.

How do I unhide a row in Excel?
Select the row headers above and below the hidden row or block, then press Ctrl+Shift+( on Windows. You can also choose Home > Cells > Format > Hide & Unhide > Unhide Rows.

Can I hide a row without deleting its data?
Yes. Hiding only changes whether the row is displayed. Its values, formulas, and formatting remain in the worksheet and can be shown again by unhiding the row.

Why does Ctrl+9 not work in Excel?
Excel may be in cell-edit mode, the browser may be intercepting the shortcut, the keyboard layout may behave differently, or sheet protection may prevent row-format changes. Finish editing, select a worksheet cell, and try the Home tab’s Format menu as an alternative.

What is the difference between hiding a row and filtering it?
A manually hidden row is concealed directly, regardless of its contents. A filtered row is excluded because it does not meet the active filter criteria. Clear the filter to restore filtered records; use Unhide Rows for manually hidden rows.

Does hiding rows protect confidential information?
No. Hidden rows remain part of the workbook and can usually be revealed. Remove sensitive data from a file before sharing it if recipients should not have access to that information.

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.