Excel Remove Blank Rows: 5 Reliable Methods That Keep Your Data
Learn how to remove blank rows in Excel with Go To Special, a COUNTA helper column, filters, Power Query or FILTER, and which method avoids deleting real data.
The fastest way to remove blank rows in Excel is to select your data, press Ctrl+G, click Special, choose Blanks, then delete the selected rows. That works perfectly when your empty rows are completely empty; if some rows are only partly blank, use the COUNTA helper-column method below so you don’t delete real data.
Below are five methods, when each one is safe, and the traps that cause most “Excel deleted my data” moments. Menu names are current as of November 2026 and may shift slightly between Excel versions.
Which method should you use?
| Method | Best for | Changes original data? | Risk |
|---|---|---|---|
| Go To Special > Blanks | Rows that are fully empty, no partial blanks | Yes | Can delete rows with partial data |
| COUNTA helper column + filter | Mixed data with some blank cells | Yes | Low |
| AutoFilter on a key column | Quick cleanup when one column is always filled | Yes | Low to medium |
| Power Query “Remove Blank Rows” | Data you import or refresh regularly | No (creates a new table) | Low |
| FILTER formula | Live, cleaned copy in Microsoft 365 / Excel 2021 | No | Low |
Whichever you choose, save a copy of the workbook first. Deleting rows is undoable with Ctrl+Z, but only until you close the file.
Method 1: Go To Special (fastest)
This is the classic approach described by Excel Easy and most training sites.
- Select the range that contains your data, including the headers.
- Press Ctrl+G to open the Go To dialog and click Special (or go to Home > Find & Select > Go To Special).
- Choose Blanks and click OK. Excel selects every empty cell in the range.
- On the Home tab, click Delete > Delete Sheet Rows (or right-click a selected cell, choose Delete, then Entire row).
The catch
Go To Special selects blank cells, not blank rows. If row 14 has a name in column A but an empty phone number in column C, that empty cell gets selected, and deleting the entire row wipes out the name too. Acuity Training rates this method medium risk for exactly this reason.
Only use it when you’re sure every row is either fully filled or fully empty. Otherwise, use Method 2.
Method 2: COUNTA helper column (safest)
This method deletes only rows where every cell is empty. Excel Easy recommends it for datasets with scattered blank cells, and a Microsoft Tech Community answer uses the same technique in Excel for the web.
- In the first empty column to the right of your data, add a header such as
Count. - In the first data row, enter a formula that counts non-empty cells across all your data columns, for example
=COUNTA(A2:Z2). AdjustA2:Z2so it covers every data column but not the helper column itself. - Fill the formula down to the last row of your data.
- Select the header row and turn on a filter (Data > Filter).
- Open the filter on the
Countcolumn and select only 0. These are your completely empty rows. - Select the visible rows by their row numbers, right-click and choose Delete Row.
- Clear the filter and delete the helper column.
A result of 0 means nothing in that row is filled, so rows with partial data are never touched.
Method 3: Filter on a column that is always filled
If one column is always populated in a real record, such as an order ID, you can filter on that column alone.
- Select your headers and turn on Data > Filter.
- Open the filter on your key column, clear Select All, and tick (Blanks).
- Select the visible rows, right-click and delete them.
- Clear or turn off the filter to see the remaining data.
This is quick, but it relies on your assumption about the key column. If a valid record can be missing that value, it will be deleted along with the truly empty rows. Check the filtered rows before deleting.
Method 4: Power Query (repeatable cleanup)
If you clean the same kind of export every week, Power Query saves you from repeating manual steps. Third-party guides consistently describe this workflow; I couldn’t confirm Microsoft’s own wording for this guide, so labels may differ slightly in your version.
- Click anywhere in your data and choose Data > From Table/Range. Excel opens the Power Query Editor.
- On the Home tab, open Remove Rows and choose Remove Blank Rows.
- Click Close & Load. Power Query writes the result to a new table and leaves the source untouched.
Guides describe this command as removing rows where every column is empty or null, so rows with only some blank cells stay. It is recorded as a step in Applied Steps, which you can delete to undo. When new data arrives, refresh the query instead of redoing the cleanup.
Method 5: FILTER formula (dynamic, non-destructive)
In Excel for Microsoft 365 and Excel 2021, the FILTER function can return a copy of your data with blank rows left out. The syntax is:
=FILTER(array, include, [if_empty])
To keep only rows where column A is filled:
=FILTER(A2:C100, A2:A100<>"", "")
To keep rows where column A and column B are filled, multiply the conditions:
=FILTER(A2:C100, (A2:A100<>"")*(B2:B100<>""), "")
To keep rows where any of the three columns is filled (that is, drop only fully empty rows), add the conditions:
=FILTER(A2:C100, (A2:A100<>"")+(B2:B100<>"")+(C2:C100<>""), "")
A few details from Microsoft’s documentation:
- The result spills into neighboring cells, so leave enough empty space below and to the right.
- The third argument,
if_empty, is what’s returned when nothing matches. Without it, an empty result gives a#CALC!error. - If any value in the
includeargument is an error, FILTER returns an error.
The formula updates automatically when the source changes. If you need static values, copy the result and use Paste Special > Values.
Where TRIMRANGE fits
Excel for Microsoft 365 also has TRIMRANGE, which excludes empty rows and columns from the outer edges of a range. It’s handy when you reference whole columns and don’t want trailing empty rows in the result, but it does not remove blank rows in the middle of your data. Microsoft lists it as a Microsoft 365 function; older versions won’t recognize it.
Why some “blank” rows won’t go away
If a row looks empty but none of these methods removes it, it probably isn’t empty:
- Spaces: a cell containing only a space looks blank, but COUNTA counts it and Go To Special skips it.
- Formulas returning
"": a formula like=IF(A2="","",A2)displays nothing but the cell still contains a formula, so it isn’t treated as empty.
To fix it, use Find and Replace to replace a single space with nothing (check that this won’t damage spaces inside real text first), or convert formula cells to values and clear the ones that show nothing. Then run your chosen method again.
Quick recommendations
- One-off cleanup, rows are fully empty or fully filled: Go To Special.
- One-off cleanup, some cells are blank inside real records: COUNTA helper column.
- Same messy export every week: Power Query.
- You want the source untouched and a live clean view: FILTER.
Whatever you pick, scan the selection before you hit Delete. A couple of seconds of checking is far cheaper than rebuilding lost rows.
Free apps worth trying
SponsoredSponsored links. Installing through them can earn us a commission, at no cost to you. Apps are free to download; some offer optional in-app purchases.
Frequently asked questions
Why did Go To Special delete rows that had data in them? +
Go To Special > Blanks selects every empty cell, not every empty row. If a row has even one blank cell, deleting the entire row removes the data in its other cells too. Use a COUNTA helper column instead when some rows are only partly filled.
Why does Excel not treat some empty-looking cells as blank? +
A cell that contains a space character or a formula returning an empty string looks blank but is not empty, so COUNTA counts it and Go To Special skips it. Clean those cells first, for example with Find and Replace for spaces, or convert formulas to values.
Can TRIMRANGE remove blank rows in the middle of my data? +
No. Microsoft documents TRIMRANGE as removing empty rows and columns from the outer edges of a range only. For blanks inside the data, combine it with FILTER or use one of the other methods.
Is there a way to remove blank rows without changing the original data? +
Yes. A FILTER formula or a Power Query query produces a cleaned copy and leaves the source untouched. Both update when the source changes, which suits data you import repeatedly.
Sources
- Delete Blank Rows in Excel - Excel Easy (excel-easy.com)
- FILTER function - Microsoft Support (support.microsoft.com)
- TRIMRANGE function - Microsoft Support (support.microsoft.com)
- Delete empty rows only - Microsoft Tech Community (techcommunity.microsoft.com)
- Excel Guide: Remove Blank Rows Or Cells - Acuity Training (acuitytraining.co.uk)