There are two ways to get rid of blank rows in Google Sheets. A formula such as FILTER or QUERY builds a clean copy and leaves the original untouched. Sorting the data moves the blank rows to the end of the range, where they no longer get in the way. Both are quick. The tricky part is deciding what counts as “blank”.
A row can look empty without being empty. It may hold a formula that returns nothing (="") or a single space. Or only some of its cells may be empty. We built a small list with each case and checked which rows every method kept.
Tested in Google Sheets. We ran these formulas and sorts on November 17, 2026 and recorded which rows each one kept. How we test
The test list
Name, City and Score in columns A to C, header in row 20, data in rows 21 to 29:
| Row | Name (A) | City (B) | Score (C) | What it tests |
|---|---|---|---|---|
| 21 | Ana | Madrid | 10 | Full row |
| 22 | Truly empty | |||
| 23 | Ben | Lyon | 7 | Full row |
| 24 | ="" |
="" |
="" |
Formulas that return nothing |
| 25 | Cara | 9 | City missing | |
| 26 | (a single space) | Looks empty, isn’t | ||
| 27 | Dev | Oslo | 5 | Full row |
| 28 | Truly empty | |||
| 29 | Eli | Rome | 8 | Full row |
A good result keeps the five people, rows 21, 23, 25, 27 and 29, and drops the other four.
1. FILTER on one column
If one column is always filled in real rows, such as a name or an ID, filter on that column:
=FILTER(A21:C29, A21:A29<>"")
It kept rows 21, 23, 25, 26, 27 and 29. The ="" row was removed, because its value equals "". The row with a single space stayed: a space isn’t empty. To drop it too, trim the text first:
=FILTER(A21:C29, LEN(TRIM(A21:A29)))
This kept exactly the five people. After TRIM, empty and space-only cells have a length of 0, and FILTER treats 0 as false.
2. FILTER when any column may hold data
If a row should stay when any of its cells has something, join the columns and check the length of the result:
=FILTER(A21:C29, LEN(TRIM(A21:A29&B21:B29&C21:C29))>0)
Rows kept: 21, 23, 25, 27 and 29. Without TRIM the space row stayed again. For a wide table, joining every column gets long. We also tested a version that checks each row with BYROW:
=FILTER(A21:C29, BYROW(A21:C29, LAMBDA(r, COUNTA(r)))>0)
It kept seven rows, including the ="" row and the space row.
Found in testing: COUNTA counts a cell with ="" as filled, so a row of empty-looking formulas survived the BYROW version. COUNTA(A21:A29) returned 7 for a column with 5 names. COUNTBLANK went the other way: it returned 3, counting the ="" cell as blank along with the two empty cells. If your data comes from formulas, use LEN with TRIM rather than COUNTA.
3. Keep only complete rows
Sometimes a half-empty row is just as useless as an empty one. To keep only the rows where every column is filled, multiply one condition per column:
=FILTER(A21:C29, (A21:A29<>"")*(B21:B29<>"")*(C21:C29<>""))
Rows kept: 21, 23, 27 and 29. Cara, row 25, was dropped because her city is missing. Multiplying conditions is how FILTER does AND; our FILTER with multiple conditions guide explains it.
4. QUERY with “is not null”
=QUERY(A20:C29, "select * where A is not null", 1)
With a text column like Name, QUERY kept the header plus Ana, Ben, Cara, the space row, Dev and Eli. It dropped the ="" row, like FILTER with <>"", and kept the space. With the numeric Score column, where C is not null returned the five scores. QUERY is handy when you also want to sort or pick columns in the same step. Our QUERY ORDER BY guide shows how.
5. Sort to push blank rows to the bottom
To clean the original data rather than build a copy, sort it. Select the rows without the header, then use Data > Sort range on the first column, A to Z. We ran this sort on a copy of the list. The truly empty rows went to the end, and the people stayed together in alphabetical order. You can then select the empty rows at the bottom and delete them.
Two things surprised us:
- The row with a single space sorted to the top, above Ana. It still has to be removed by hand.
- In a copy pasted as values only, the
=""row also sorted to the top. In the original, with the formulas still in place, it went to the bottom with the empty rows.
Sorting changes the order of your rows. If the original order matters, use one of the formulas above instead, or add a column with row numbers before sorting so you can sort back by it.
Which method to use
| Situation | Method |
|---|---|
| One column is always filled | FILTER(range, LEN(TRIM(col))) |
| Any column may hold data | FILTER(range, LEN(TRIM(A&B&C))>0) |
| Only complete rows | FILTER with one <>"" per column, multiplied |
| Also sort or pick columns | QUERY with is not null |
| Clean the original data | Sort range, then delete the rows at the end |
For a single column, there are even shorter options, covered in our guide to UNIQUE without blanks. If cells still hold stray spaces, see remove extra spaces.