AI Content Creation

How to Hide Rows Automatically in Google Sheets

Completed rows should disappear on their own. The two standard answers both fail the moment a formula, not a person, changes the value.

By FITS TeamAugust 2, 20263 min read

The request is always some version of the same thing. Hide the rows marked Complete. Hide the rows that are not mine. Hide the rows nobody needs to look at today.

What people usually mean is not literally hiding rows. They want a view that only shows the rows that still matter.

The Old Way (Filter Views and onEdit)

A filter view is the first suggestion. Set a condition on the status column, save the view, share the link.

It works until a value changes by formula rather than by typing. Filter views do not re-evaluate on recalculation, so a row that just became Complete stays visible until someone reopens the filter.

The second suggestion is Apps Script.

function onEdit(e) { if (e.range.getColumn() == 5 && e.value == "Complete") { e.source.getActiveSheet().hideRows(e.range.getRow()); } }

This has a harder limit. The onEdit trigger fires on human edits only. A cell that changes because a formula recalculated never fires it, so script-based hiding silently misses exactly the rows you built it for.

Both approaches also need the status column to already be clean. If the column contains Done, done, complete, and Finished as free text, neither the filter nor the script catches all four.

The FITS Way (Flag, Then Filter)

Split the job in two. Use FITS to decide whether a row should be visible, then use FILTER to build the view.

=FITS("Should this task still be shown on the active board? Answer HIDE if it is finished, cancelled, or duplicated. Otherwise answer SHOW. Answer one word only. Row: " & A2 & " | " & E2 & " | " & F2)

That formula reads Done, done, complete, and Finished the same way a person does. No cleanup pass on the status column first.

Point FILTER at the flag column on a second tab and you have a live view that recalculates like any other formula.

=FILTER(Tasks!A2:F, Tasks!G2:G = "SHOW")

Because both parts are formulas, a value changing by recalculation updates the view immediately. There is no trigger to fire and no quota to hit.

For a rule that depends on judgment rather than status, describe the judgment.

=FITS("Answer HIDE if this support ticket is resolved or is spam, otherwise SHOW. One word only: " & B2)

If you genuinely need the rows collapsed rather than filtered, sort on the flag column and collapse the block at the bottom. That keeps everything in one tab without a script.

When to Use Each

For one clean status column and manual edits only, a filter view is free and takes a minute. Reach for =FITS() when the status text is inconsistent, when values change by formula, or when the hide rule needs judgment. Related jobs use the same pattern: writing IF THEN logic in plain English, running automations without a Zapier subscription, and building a workflow hub for the team. The full tour is in automating Google Sheets tasks you used to need regex for.

Stop Writing onEdit Scripts

FITS puts plain-English AI formulas inside Google Sheets. Flag the rows you do not want to see and let FILTER handle the rest. Free tier included.