In Excel: select the row numbers, right-click and choose Hide; to bring them back, select the rows around the gap (or Ctrl+A for the whole sheet) and choose Unhide, or use Home ▸ Format ▸ Hide & Unhide.
Click a row number and drag (or Ctrl-click) to select the whole rows you want to hide.
Right-click the selection and choose Hide, or use Home ▸ Format ▸ Hide & Unhide ▸ Hide Rows.
To unhide a few, select the rows immediately above and below the gap, right-click and choose Unhide.
To unhide every row at once, press Ctrl+A, then Home ▸ Format ▸ Hide & Unhide ▸ Unhide Rows.
What this does
Hiding a row collapses it out of view without deleting anything — the data, formulas and any totals that reference it all keep working, the row is simply not shown. You select whole rows by their numbers, right-click and pick Hide, and a doubled border marks where rows are missing. Unhiding reverses it: select the rows on either side of the gap and choose Unhide. To reveal every hidden row at once, select the entire sheet with Ctrl+A first. Keep the inputs visible and clearly labelled and the whole thing stays auditable — anyone who opens the file later, including you, can see at a glance exactly what feeds the result and change one assumption without hunting through the formula. The difference between a quick fix and a sheet you can trust is the extra minute you spend validating “excel hide rows based on cell value”. Start on a copy or a tiny sample, keep the affected rows visible, and compare the result with the tool above before you touch the real workbook. When this is a ribbon command, the selection matters more than the button: confirm the range, apply the command, then spot-check the output before saving. The point is a layout choice that keeps the sheet readable and sortable, but the practical win is that someone else can open the file and understand what happened without asking you.
A worked example
A report has detail in rows 5–8 you want out of the way. Click row header 5, drag to row 8 to select all four, right-click and choose Hide — rows 5 to 8 vanish and the numbering jumps from 4 straight to 9. Later, to bring them all back, press Ctrl+A to select the whole sheet, then Home ▸ Format ▸ Hide & Unhide ▸ Unhide Rows, and rows 5–8 reappear exactly as they were. Hide rows to tuck away detail, helper calculations or seasonal entries without losing them — a cleaner print-out, a tidier review, a report that shows only the summary. Because nothing is deleted, you can unhide and get every row back exactly as it was whenever you need it. One habit worth forming early: name the cells that hold your inputs, so the formula reads in plain language instead of a string of cell addresses. A reviewer — or you in three months — can then follow the logic without decoding what B7 and D2 were supposed to mean, which is most of what makes a sheet maintainable.
In Google Sheets
If you are in Google Sheets rather than Excel, the good news is that the formula shown here is identical and the workflow barely changes — menus sit across the top instead of in a ribbon, and a few function names differ slightly, but anything you build here moves across with little or no rework. Keep this page bookmarked for the next time the same question comes up. Better still, rebuild the example once in your own sheet — doing it yourself, with the tool above to check against, is what turns a copied formula into a technique you own. Treat “excel hide rows based on cell value” as a small building block rather than a chore. Once the inputs sit in their own cells and the formula reads from them, the same setup answers a dozen related questions with a tweak, and Excel keeps every dependent figure current as the data changes. The tool above is there so you can rehearse and verify before committing anything to a real workbook; the steps and worked example are there so the logic sticks. Get it right once and it stops costing you time — it starts saving it, every time the question comes back around.
Common mistakes
- Selecting cells instead of whole row headers, so Hide is greyed out or hides the wrong thing.
- Forgetting hidden rows still count in
SUMand other ranges — hiding does not exclude them from formulas. - Trying to unhide row 1 by selecting around it (there is no row above) — instead select from row 1 down, or use the Name Box and Unhide Rows.
- Confusing hiding with filtering; a filter hides rows by condition and is cleared differently from a manual Hide.
Frequently asked questions
How do I unhide all rows at once?
Select the entire sheet with Ctrl+A (or click the corner box above row 1), then Home ▸ Format ▸ Hide & Unhide ▸ Unhide Rows reveals every hidden row in one step.
Do hidden rows still affect my totals?
Yes — SUM and most functions still include hidden rows. Use SUBTOTAL or AGGREGATE if you need a total that ignores hidden rows.
How do I unhide the very first row?
There is no row above row 1 to select, so type A1 in the Name Box to land there, then Home ▸ Format ▸ Hide & Unhide ▸ Unhide Rows.
Other ways people ask this
People reach this page typing “excel hide row based on cell value” and “excel hide 0 values”, among other phrasings; whichever wording you used, the fix above is the one you want.
Why do people search for this in so many different ways?
Because the same task has many names. “excel hide row based on cell value”, “excel hide 0 values” all point at the one operation explained on this page, which is why they all lead here.