How to Hide Rows in Excel: Complete Guide

How to hide rows in Excel using keyboard shortcuts, right-click menu, ribbon options, and filters. Covers single, multiple, and conditional row hiding.

How to Hide Rows in Excel: Complete Guide

Knowing how to hide rows in Excel is one of those small skills that quietly transforms how you work with spreadsheets. You might want to tuck away helper columns from a stakeholder report, collapse intermediate calculations before sharing a workbook, or simply clean up clutter on a sheet that's grown unwieldy over time.

Whatever the reason, hiding rows keeps the data intact while pulling it out of view—reversible, non-destructive, and faster than deleting and reinserting later. It's a skill every spreadsheet user picks up sooner or later, and the sooner you commit it to muscle memory, the more time it saves over a working week.

This guide walks through every reliable method for hiding rows in modern Excel, from the lightning-fast keyboard shortcut to the right-click menu, ribbon options, and the trickier scenarios involving multiple non-adjacent rows, filtered ranges, and grouped outlines. The steps work on Excel 365, 2021, 2019, and 2016 across Windows and macOS, with notes on Excel for the web and Excel on Mac where the experience differs.

Before diving in, it helps to understand what "hiding" actually does. Excel doesn't delete a hidden row—it sets the row height to zero pixels, which makes the row invisible but keeps every cell, formula, and reference intact. Formulas elsewhere on the sheet still pull from hidden rows, named ranges still cover them, and unhiding restores the row exactly as it was. That's why hiding is the safe choice when you want clean visuals without losing data.

The methods below assume you're working with row numbers visible on the left side of the worksheet. If you can't see row numbers, click the View tab and confirm Headings is checked. With that out of the way, here's everything you need to know about hiding rows in Excel—quick wins first, then the trickier edge cases.

Hiding Rows in Excel: Quick Reference

Ctrl+9Windows shortcut to hide rows
Cmd+9Mac shortcut to hide rows
0 pxRow height when hidden
1,048,576Max rows per worksheet

Quick Answer: How to Hide Rows in Excel

Single row or selection: Click the row number, then press Ctrl + 9 (Windows) or Cmd + 9 (Mac). Right-click method: Select rows by clicking row numbers, right-click, choose Hide. Ribbon: Home tab → Format → Hide & Unhide → Hide Rows. Non-adjacent rows: Hold Ctrl while clicking row numbers, then right-click and select Hide. To reverse, see our unhide rows guide.

The Fastest Method: Keyboard Shortcut

The keyboard shortcut for hiding rows in Excel is Ctrl + 9 on Windows and Cmd + 9 on Mac. Click any row number on the left side of the worksheet, or click and drag across multiple row numbers to select a range, then press the shortcut. Excel collapses the selected rows instantly. No menus, no clicks beyond the selection itself.

If you want to hide several rows at once, click the first row number, hold Shift, and click the last row number to select a continuous range. For non-adjacent rows—say rows 5, 10, and 15—hold Ctrl while clicking each row number individually, then press Ctrl + 9. Every selected row disappears in the same motion. This is how power users move through cleanup tasks without slowing down to navigate menus.

The shortcut also works when you've selected entire cells rather than row numbers. Click any cell, press Shift + Space to select the whole row, then Ctrl + 9 to hide it. This sequence is useful when your hands are already on the keyboard mid-formula and you don't want to reach for the mouse. Many keyboard-driven Excel users build their entire row-management workflow around Shift + Space (select row), Ctrl + 9 (hide), and Ctrl + Shift + 9 (unhide—same logic, plus Shift).

Mac users occasionally find that Cmd + 9 conflicts with macOS window-switching shortcuts in older macOS versions. If the shortcut doesn't fire, check System Preferences → Keyboard → Shortcuts and disable any conflicting binding, or fall back to the right-click method described below. The right-click approach is universal and never collides with operating system shortcuts.

Microsoft Excel - Microsoft Excel certification study resource

Six Ways to Hide Rows in Excel

Keyboard Shortcut

Select row(s), press Ctrl + 9 on Windows or Cmd + 9 on Mac. Fastest method once committed to memory—under a second per hide.

Right-Click Menu

Select row numbers, right-click anywhere in the selection, choose Hide. Universal, works across every Excel version on Windows and Mac.

Home Ribbon

Home tab → Cells group → Format → Hide & Unhide → Hide Rows. Menu-based, easy for new users learning the interface.

Set Row Height to 0

Right-click row, choose Row Height, enter 0. Effectively hides the row by collapsing height. Works when other methods fail.

Filter Rows

Data → Filter, then apply criteria. Rows not matching filter are hidden automatically—reversible by clearing filter.

Group and Collapse

Data → Group, then click minus sign to collapse. Useful for sections you want to toggle visible/hidden repeatedly.

Right-Click: The Universal Method

If you don't want to memorise shortcuts, the right-click menu is reliable and works identically across every Excel version, every operating system, and even Excel for the web. Select the rows you want to hide by clicking and dragging across their row numbers on the left side of the sheet—the numbers should turn dark to indicate selection. Then right-click anywhere within the highlighted row numbers and choose Hide from the context menu.

The right-click menu is context-aware: when you've selected row numbers, the menu shows row-specific options including Hide, Row Height, Insert, and Delete. When you select column letters instead, the same right-click reveals column-specific commands. This contextual behaviour means you don't have to remember separate menus for rows and columns—the right-click gesture handles both as long as you've selected the correct headers first.

Make sure you've actually selected row numbers (the integers in the leftmost column) rather than cells within the rows. If you right-click on cells instead of row numbers, the context menu shows cell-formatting options like Format Cells, Insert Comment, and Hyperlink—but no Hide option. This catches new users off guard frequently. The fix is simple: click directly on the row number to select the whole row first, then right-click. The selection should highlight the entire row across the worksheet.

Some Excel installations on enterprise networks disable certain right-click context menu items via group policy, which can leave Hide greyed out or missing. If you're in a restricted environment, the Home ribbon route described in the next section provides the same functionality through visible menu paths that are rarely blocked.

Hide Rows by Platform

Shortcut: Select row(s), press Ctrl + 9. Right-click: Select row numbers, right-click, choose Hide. Ribbon: Home → Format → Hide & Unhide → Hide Rows. Multiple rows: Hold Shift for a range, Ctrl for non-adjacent rows, then hide as a batch. Notes: Works identically across Excel 2016, 2019, 2021, and 365.

Excel Spreadsheet - Microsoft Excel certification study resource

Ribbon Method: Click-Driven Hiding

The Home ribbon offers a menu-based path that's worth knowing when keyboard shortcuts aren't your style or when you're sharing your screen during training. After selecting the rows to hide, click the Home tab on the ribbon, find the Cells group near the right side, click Format, hover over Hide & Unhide, and click Hide Rows. The selected rows collapse out of sight immediately.

This route involves more clicks than the shortcut or right-click methods, but it's discoverable—newer Excel users can find Hide Rows by exploring the ribbon without needing to know the menu path in advance. The Format menu in the Home tab also exposes other useful options including row height, column width, default cell formatting, sheet protection, and tab colour settings, making it a worthwhile menu to be familiar with even beyond the hide function.

The Format dropdown is well organised. The top section handles cell size (row height, column width, AutoFit). The middle section covers visibility (hide and unhide for rows, columns, and entire sheets). The bottom section deals with worksheet organisation (rename sheet, move or copy sheet, tab colour, protect sheet). If you spend significant time in Excel, learning the Format dropdown layout pays back during routine formatting work.

One subtle Mac note: on Excel for Mac the menu structure under Format reads "Visibility" rather than "Hide & Unhide," though the same options live underneath. This minor wording difference catches users who switch between Windows and Mac Excel installations. Once you've spotted the visibility submenu once, the path becomes muscle memory regardless of platform.

Hiding Multiple Rows at Once

Hiding a single row is straightforward, but real spreadsheet work often involves collapsing large ranges or scattered groups of rows at once. Excel handles both efficiently if you know the selection tricks. For a contiguous range—say rows 20 through 50—click row 20's number, hold Shift, and click row 50's number. Both rows and everything between them highlight in dark grey. Press Ctrl + 9 or right-click and choose Hide, and all 31 rows collapse in one operation.

For non-adjacent rows, the technique is slightly different. Hold Ctrl on Windows or Cmd on Mac while clicking each individual row number you want to hide. Selected rows highlight independently rather than as a continuous block, and the active selection grows with each click. Once all target rows are highlighted, right-click any of them and choose Hide—or just press the shortcut. Excel hides every selected row simultaneously, regardless of how far apart they are on the sheet.

This batch approach is particularly useful for cleaning up large datasets where helper rows are scattered throughout. Rather than hiding rows one at a time and scrolling between operations, identify every row to hide, Ctrl-click them all, then hide as a group. The same logic applies to columns—Ctrl-click column letters for non-adjacent selection, then press Ctrl + 0 (zero) to hide them as a batch. Some users find it helpful to colour-code rows before hiding so they're easy to locate later when it's time to unhide rows or revisit the hidden data.

Step-by-Step: Hide Rows in Excel

  • Open your Excel workbook and navigate to the worksheet containing rows you want to hide
  • Click the row number on the left edge to select the entire row—the row should highlight across the sheet
  • To select multiple adjacent rows, click the first row number, hold Shift, and click the last row number
  • For non-adjacent rows, hold Ctrl (Cmd on Mac) while clicking each row number you want to hide
  • Press Ctrl + 9 (Windows) or Cmd + 9 (Mac) to hide the selected rows instantly
  • Alternatively, right-click within the selected row numbers and choose Hide from the context menu
  • Or use the ribbon path: Home tab → Format → Hide & Unhide → Hide Rows
  • Verify rows are hidden—row numbers should skip from one value to the next where hidden rows existed
  • Save the workbook to preserve hidden-row state for next time it opens
Excellence Playa Mujeres - Microsoft Excel certification study resource

Hiding Rows Based on Cell Value

One of the most common real-world reasons to hide rows is to suppress rows that don't meet specific criteria—hide all rows where status is "Closed," or hide every row with zero in the total column. Manually clicking through rows is tedious; filtering or VBA does the work in seconds.

The simplest approach uses Excel's built-in filter feature. Select your data range, click Data on the ribbon, then click Filter. Filter arrows appear on each column header. Click the arrow on the column you want to filter by, uncheck the values you want to hide, and click OK. Excel hides every row that doesn't match your remaining checked values. Filtering is reversible: click the filter icon again and choose Clear Filter to reveal everything, or use Data → Clear to remove all filters at once.

For more complex conditions—hide rows where a cell value is greater than a threshold, contains specific text, or falls between two values—use the Number Filters or Text Filters options inside the filter dropdown. Excel provides a wide range of comparison operators (equals, greater than, between, contains, begins with, etc.) that handle most real-world filtering needs without writing any formulas.

For repeatable hide operations triggered by changes elsewhere in the workbook, VBA macros provide programmatic control. A simple loop like For Each cell In Range("A1:A100"): If cell.Value = 0 Then cell.EntireRow.Hidden = True: Next cell hides every row in column A where the value equals zero. VBA macros run on Windows Excel and most Mac configurations, though Excel for the web doesn't support them. For non-VBA users, conditional formatting combined with manual filtering covers most use cases without dropping into code.

Grouping vs Hiding: When to Choose Each

Excel offers two distinct ways to collapse rows out of view: hiding and grouping. They look similar at first glance, but behave differently and serve different purposes. Hiding is a single-action collapse with no visual indicator beyond row numbers that skip values. Grouping creates a visible outline structure with plus/minus toggles in the left margin that let you expand and collapse sections on demand.

Choose hiding when you want rows tucked permanently out of sight for the duration of the work—helper calculations, sensitive data, draft rows you don't want stakeholders to see. The rows stay hidden until someone explicitly unhides them. There's no UI hint that hidden rows exist beyond a careful eye on row-number sequence.

Choose grouping when rows form logical sections that recipients might want to expand and collapse. Quarterly summaries with detail rows underneath, expandable category breakdowns, hierarchical reports where users drill down into details—these benefit from grouping because the plus signs and outline levels make the structure obvious and the toggle is one click. To group rows, select them and click Data → Group, or press Alt + Shift + Right Arrow on Windows. To ungroup, select grouped rows and click Data → Ungroup or press Alt + Shift + Left Arrow.

Grouping supports multiple outline levels (up to eight) so you can build nested expandable sections, with level buttons (1, 2, 3) at the top-left letting users collapse everything to the highest level or drill down to full detail. For complex financial models, project plans, or any report with hierarchical structure, grouping creates a much better user experience than flat hidden rows.

Hiding Rows in Excel: Pros and Cons

Pros
  • +Reversible—hidden data stays intact and can be revealed any time
  • +Cleans up cluttered worksheets for presentation without losing data
  • +Faster than deleting and re-inserting rows you might need later
  • +Hides intermediate calculations and helper data from stakeholder views
  • +Works across all Excel versions, platforms, and file formats
Cons
  • Hidden rows still affect formulas like SUM, AVERAGE, and COUNT by default
  • Easy for collaborators to miss that data is hidden, leading to confusion
  • Hidden state isn't visually obvious—only a skip in row numbers indicates it
  • Sorting includes hidden rows, which can scramble carefully ordered data
  • Worksheet protection complicates unhiding for users without the password

Common Scenarios for Hiding Rows

Helper Calculations

Hide intermediate formula rows that feed final results without cluttering the report. Stakeholders see the headline numbers; the math stays under the hood.

Draft Content

Tuck unfinished rows out of sight while preserving them for later revision. Common in project trackers and content calendars.

Sensitive Data

Hide rows containing salaries, internal notes, or other confidential information before sharing a workbook externally.

Template Rows

Keep template structure rows hidden until needed. Common in budget templates, invoice forms, and inventory sheets.

Conditional Reporting

Hide rows that don't apply to the current scenario—quarter-specific data, department-specific entries, audience-specific notes.

Print Preparation

Hide rows you don't want on the printed page without resetting print areas or creating multiple sheets.

Hiding Rows in Protected Worksheets

Worksheet protection adds a wrinkle to row hiding. When Sheet Protection is active, users can only perform actions explicitly allowed during the protection setup. By default, hiding and unhiding rows are blocked once protection turns on. If you try to hide a row in a protected sheet, Excel shows an error message saying the cell or chart you're trying to change is on a protected sheet.

To allow row hiding in a protected sheet, first unprotect via Review → Unprotect Sheet (entering the password if one was set). Then re-enter protection mode through Review → Protect Sheet, and in the dialog box, check the box for "Format rows" under "Allow all users of this worksheet to." This grants permission to hide and unhide rows while keeping other protections active. Click OK and re-enter your password to lock the sheet down with row formatting enabled.

The opposite scenario applies when you want to lock down hidden rows so users can't reveal them. Hide the rows first, then protect the sheet without checking Format rows. Users see the worksheet without the hidden rows and have no way to unhide rows without the protection password. This is a common technique for distributing reports while keeping calculation details inaccessible. Note that the password is the only protection—an Excel file structure is generally readable by determined users with VBA skills, so it's not a substitute for genuine security.

For workbook-level protection, the equivalent is Review → Protect Workbook, which blocks structural changes like adding, deleting, or renaming sheets but doesn't affect row hiding on individual sheets. The two protection levels operate independently—sheet protection handles cell-level operations, workbook protection handles sheet-level structure.

Excel Questions and Answers

About the Author

James R. HargroveJD, LLM

Attorney & Bar Exam Preparation Specialist

Yale Law School

James R. Hargrove is a practicing attorney and legal educator with a Juris Doctor from Yale Law School and an LLM in Constitutional Law. With over a decade of experience coaching bar exam candidates across multiple jurisdictions, he specializes in MBE strategy, state-specific essay preparation, and multistate performance test techniques.