Remove Blank Rows in Excel
Upload a sheet or paste your cells and download it without the empty rows. A row is removed only when every cell in it is empty.
Updated
How to remove blank rows
- Choose your file, or paste cells copied from Excel or Google Sheets and select Use pasted data.
- If the workbook has several sheets, pick the one to clean from the tabs.
- Check Blank rows removed and Rows left, then look over the preview.
- Select Download .xlsx or Download .csv.
There are no options to set. A row is removed only when every cell in it is empty or holds nothing except spaces. A row with a value in a single cell is kept. Your original file is not changed. The download is a new file.
Remove blank rows in Excel itself
With Go To Special, and why it is risky
This is the method most guides show:
- Select the data.
- Go to Home > Find & Select > Go To Special.
- Choose Blanks and select OK.
- Go to Home > Delete > Delete Sheet Rows.
Step 3 selects every empty cell in the range. It does not check whether the rest of the row is empty. Step 4 then deletes every row that contains one of those cells. If a customer has no phone number, the whole customer row is deleted along with the truly empty rows.
Use this method only on a single column that is filled in every real row, such as an ID column. Select that column alone before step 2. Then a blank in it does mean the row is empty. Press Ctrl+Z straight away if more rows disappear than you expected.
With a helper column and a filter
This method checks the whole row, so partly filled rows are safe.
- In the first free column, next to the first data row, enter a count of the filled cells in that row:
=COUNTA(A2:F2)
- Fill the formula down to the last row. Empty rows show 0.
- Select the header row and go to Data > Filter.
- Open the arrow on the helper column and show only 0.
- Select the visible rows by their row numbers, right-click and choose Delete Row.
- Select Data > Clear to show everything again, then delete the helper column.
Excel deletes only the visible rows of a filtered list, so the hidden rows with data are not touched.
With a sort
Sorting any column pushes empty rows to the bottom of the range, where they no longer split the data. This changes the row order. If the order matters, add a numbered column first, sort, delete the empty block, then sort by the numbered column to restore the order.
With the FILTER function
=FILTER(A2:C100, A2:A100<>"")
FILTER leaves the source alone and spills the rows where column A is filled into new cells. It needs Excel 365 or Excel 2021.
In Google Sheets
- Select the data and choose Data > Create a filter.
- Open the filter on a column that every real row fills in, select Clear, then tick (Blanks).
- Select the rows that remain, right-click and choose the delete rows option.
- Choose Data > Remove filter.
The FILTER formula above works the same way in Google Sheets.
Which method to use
| Situation | Best option |
|---|---|
| A file you were sent, cleaned once | This page |
| Some rows have gaps that must stay | This page, or the COUNTA helper column |
| One column is filled in every real row | Go To Special on that column only |
| The data keeps changing | =FILTER() |
| You also need repeats removed | Remove duplicates afterwards |
Mistakes to avoid
- Running Go To Special on the whole table. It finds blank cells. A table with optional columns will lose real rows.
- Forgetting cells that only look empty. Spaces and formulas that return
""count as content for COUNTA and are skipped by Go To Special. If the helper column shows 1 on a row that looks empty, that is the reason. - Deleting blank rows that are there on purpose. Reports often use an empty row to separate sections or to sit above a totals row. Removing them is fine for data you will sort, filter or import, and unhelpful for a layout meant to be read.
- Not keeping the original. Work on a copy until you have compared the row counts.
Limits
- 50 MB per file. Formats: .xlsx, .xls, .xlsm, .csv, .tsv, .txt and .ods.
- One sheet is cleaned at a time, and the download holds that sheet.
- Empty columns are not removed, only empty rows.
- The file is read on your device and is not uploaded.
- The download contains values. Formulas are replaced by their results, and cell formatting is not carried over.
Questions
How do I remove blank rows in Excel?
The safe way is a helper column. Enter =COUNTA(A2:F2) next to the data, fill it down, filter that column for 0, delete the visible rows, then clear the filter. Or upload the file above and download it with the empty rows gone.
How do I delete empty rows without deleting rows that have some data?
Avoid Go To Special > Blanks on the whole table, because it selects every empty cell and deleting then removes partly filled rows. Use the COUNTA helper column, or this tool, which removes a row only when all of its cells are empty.
Is there a shortcut to delete a row in Excel?
Select the row with Shift+Space, then press Ctrl+- (Ctrl and the minus key). With several rows selected, the same shortcut deletes all of them.
Why does a row that looks empty not get removed in Excel?
It usually holds spaces or a formula that returns an empty string. COUNTA counts both as content. This tool treats a cell that contains only spaces as empty.
How do I remove blank rows in Google Sheets?
Select the data, choose Data > Create a filter, filter a column that is always filled to show only (Blanks), select the rows that remain, right-click and delete them. Then remove the filter.
Can a formula remove blank rows?
In Excel 365 and Excel 2021, =FILTER(A2:C100, A2:A100<>"") returns only the rows where column A is filled. The original data stays as it is and the result updates when the data changes.