Skip to main content

Cleanup formula page

Remove Blank Rows Formula

Use this when a table has blank spacer rows and you need a clean dynamic output.

Best for

Remove blank rows with a formula.

What it returns

Rows where column A is blank are excluded from the output.

Copy formulas

Excel formula
=FILTER(A2:C100, A2:A100<>"", "No rows")
Google Sheets formula
=IFERROR(FILTER(A2:C100, A2:A100<>""), "No rows")
Excel / Google Sheets difference

Excel FILTER accepts its no-match message as a third argument; Google Sheets commonly wraps FILTER with IFERROR to return No rows.

Example data

EmailRegionStatus
maya@example.comEastActive
noah@example.comWestActive
maya@example.comEastActive
WestInactive
What it returns

Rows where column A is blank are excluded from the output.

How the formula works

  • A2:C100 matches the three-column sample table returned.
  • A2:A100<>"" keeps rows with a nonblank key.
  • The fallback prevents a raw no-match error.
Syntax pieceRole in the formula
A2:C100The full row range returned when a row passes the key test.
A2:A100The default key column used to decide whether a row is included.
fallbackThe message shown when no row meets the key condition.

Verified examples

Return nonblank rows
=FILTER(A2:C100, A2:A100<>"", "No rows")

Excel: Use the sample A2:C100 table with three rows whose key in column A is filled. Returns: 3 returned rows

No rows fallback
=IFERROR(FILTER(A2:C100, A2:A100<>""), "No rows")

Google Sheets: Leave every cell in A2:A100 blank. Returns: No rows

Use Region as key
=FILTER(A2:C100,B2:B100<>"","No rows")

Excel: Use the sample table and include four rows with a nonblank Region in B2:B100. Returns: 4 sample rows

Common errors and fixes

IssueLikely causeFix
A row with a visible value is removedThe selected key column is blank or contains a formula that returns an empty string.Choose a reliable key column or adjust the condition for formula-generated values.
FILTER returns a spill errorCells in the output area are not empty.Clear the spill area or place the formula where the returned rows have room.
Useful rows disappearThe formula tests the wrong key column for blankness.Use the column that defines whether the row is complete, such as B2:B100 for Region.

When not to use this formula

  • Do not use this formula when source rows must be physically deleted; it returns a new filtered view and leaves the source unchanged.

Alternatives

AlternativeWhen to use it
Count Blank Cells FormulaUse when the goal is measuring blank cells rather than returning cleaned rows.
Google Sheets FILTER Formula BuilderUse when the filter range and condition need guided configuration.

Related formulas

Official references

FAQ

Which column controls inclusion?

Only the column in the filter condition controls inclusion. Change A2:A100 to another reliable key when needed.

Does FILTER delete blank source rows?

No. It returns a new dynamic view and leaves the original source rows unchanged.