Cleanup formula page
Remove Blank Rows Formula
Use this when a table has blank spacer rows and you need a clean dynamic output.
Remove blank rows with a formula.
Rows where column A is blank are excluded from the output.
Copy formulas
=FILTER(A2:C100, A2:A100<>"", "No rows")=IFERROR(FILTER(A2:C100, A2:A100<>""), "No rows")Excel FILTER accepts its no-match message as a third argument; Google Sheets commonly wraps FILTER with IFERROR to return No rows.
Example data
| Region | Status | |
|---|---|---|
| maya@example.com | East | Active |
| noah@example.com | West | Active |
| maya@example.com | East | Active |
| West | Inactive |
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 piece | Role in the formula |
|---|---|
| A2:C100 | The full row range returned when a row passes the key test. |
| A2:A100 | The default key column used to decide whether a row is included. |
| fallback | The message shown when no row meets the key condition. |
Verified examples
=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
=IFERROR(FILTER(A2:C100, A2:A100<>""), "No rows")Google Sheets: Leave every cell in A2:A100 blank. Returns: No rows
=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
| Issue | Likely cause | Fix |
|---|---|---|
| A row with a visible value is removed | The 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 error | Cells in the output area are not empty. | Clear the spill area or place the formula where the returned rows have room. |
| Useful rows disappear | The 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
| Alternative | When to use it |
|---|---|
| Count Blank Cells Formula | Use when the goal is measuring blank cells rather than returning cleaned rows. |
| Google Sheets FILTER Formula Builder | Use when the filter range and condition need guided configuration. |
Related formulas
Official references
- FILTER function from Microsoft
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.