In short
- Select your data, press Ctrl+G, choose Special, then Blanks, then delete the sheet rows. It is fast, but it also removes any row that has even one empty cell.
- The safe way: add a helper column that counts what each row holds, filter for zero, and delete only those rows.
- Clean up an Excel file free in your browser
You paste a long list into Excel and find gaps all through it. Or you export from another program and every second row is empty. Deleting them one by one would take an hour, and Excel has no single button called Remove Blank Rows.
There are three good methods: Go To Special, a filter, and a sort. They differ in one important way. Some of them delete a row when any cell in it is empty, others only when the whole row is empty. This guide shows which is which, how to deal with rows that look empty and are not, and what EditFlip can do for a small clean-up.
On EditFlip, step by step
- Step 1
Choose the Excel file
Go to editflip.com and press Choose files, or drop the .xlsx, .xls or .csv on the page. The Options panel comes up with a Preview button. Use Preview first to see where the empty rows are.
- Step 2
Open Edit and press Delete row
Press the big Edit button. The sheet opens as a grid, with the tools Add row, Delete row, Add column and Delete column. Press Delete row, and a bar says Tap the row to delete.
- Step 3
Tap each empty row
Tap the empty row, and it goes. The tool switches itself off after one row, so press Delete row again for the next one. Press Undo if you hit the wrong row. This suits a handful of gaps, not hundreds.
- Step 4
Press Done, then Download
Check the sheet tabs at the bottom if you have more than one sheet, because each sheet needs its own clean-up. Then press Done and Download. Your formulas keep working. For a list with hundreds of gaps, use the Excel methods below.
Method 1: Go To Special, and its trap
This is the one everybody finds first. Select the column that must always have a value, for example the name column. Press Ctrl+G, choose Special, tick Blanks and press OK. Every empty cell in the selection is now highlighted. On the Home tab, open Delete and choose Delete Sheet Rows.
The trap is in what Blanks means. It means every empty cell, not every empty row. If you select the whole table and a customer has no phone number, that one empty cell is picked up, and the whole row goes with it, name and address included.
So use this method on one column only, and only when that column is filled in on every row you want to keep. An ID or a date column is often a good choice. If you are not sure, use the helper column method below. Ctrl+Z undoes the deletion straight away, so look at the result before you do anything else.
Method 2: a helper column and a filter, the safest way
This works on any table. Add a new column at the far right and give it a heading. In the first data row, type a formula that counts the filled cells in that row, for example =COUNTA(A2:F2) if your data runs from A to F. Copy it down the whole list.
Now every row has a number. A row with data shows 1 or more. A truly empty row shows 0. Click any cell in the table, choose Data, then Filter, and open the dropdown in the helper column. Untick everything except 0 and press OK. Only the empty rows are left on the screen.
Select those row numbers on the left, right-click and choose Delete Row. Then clear the filter, and delete the helper column. The rows that had data in them were never touched, even when they had gaps. Do not select the rows with the mouse drag across the whole sheet while the filter is on and then press the Delete key: that only clears cells and leaves the rows behind.
Method 3: sort the blanks to the bottom
When the order of your rows does not matter, sorting is the easiest. Select the data, open Data, then Sort, and sort by a column that is full on every real row. Blank rows are placed at the bottom, whichever direction you sort, and you can delete them in one go.
When the order does matter, put a number in a new column first: 1 in the first row, 2 in the second, and fill down. Sort by your key column, delete the empty rows at the bottom, then sort by the number column to get the old order back. Delete that column at the end.
Sorting moves whole rows only if you select the whole table. If you select one column and press sort, Excel asks whether to expand the selection. Say yes, or the columns will no longer match each other.
Rows that look empty but are not
If a method skips a row that looks blank, something is in it. The usual suspects are a single space, a formula that returns nothing, a cell that holds only an apostrophe, or a space that came from a web page. That last one is a non-breaking space, and Excel does not treat it as a normal space.
COUNTA counts all of these as filled, so the helper column shows 1 where you expected 0. A stricter count is =SUMPRODUCT(--(LEN(TRIM(A2:F2))>0)). It counts only cells that still have characters after spaces are trimmed. If you know a non-breaking space is involved, use Find and Replace first and replace it with nothing.
To see what is inside a suspect cell, click it and look at the formula bar. A cursor that sits a few spaces in gives it away.
Before you delete: formulas, tables and merged cells
Deleting rows can break formulas that point to them. A total that adds up A2:A200 simply gets shorter. A formula that pointed at a single deleted cell shows #REF!. Scan the sheet for #REF! afterwards.
Inside an Excel Table, use Delete Table Rows from the right-click menu instead. In a range, merged cells that stretch over several rows can block a delete or leave odd gaps, so unmerge them first.
Hidden rows and filtered rows are a separate thing. If rows seem to be missing, they may be hidden and not blank, so check that before you delete.
Empty rows far below your data
Sometimes the problem is not gaps but a sheet that scrolls on for ever. Press Ctrl+End. Excel jumps to the last cell it believes is in use. If that is far below your real data, there are formatted but empty rows down there, and they make the file heavier.
Select the first unused row, press Ctrl+Shift+Down arrow to select all the rows below it, then right-click and choose Delete. Save the file, and Ctrl+End then lands where it should. Clearing the cells is not enough, because Excel remembers the formatting until the rows are deleted.
Power Query, found in the Data tab, also has a Remove Blank Rows command, which is handy for a list you import again and again.
On a phone, and what EditFlip can and cannot do
The Excel apps on phones are good for a few deletions. Tap the row number, then choose Delete. Filters and Go To Special are far easier on a computer.
EditFlip works in the browser on both and deletes rows by hand, one tap each, in sheets of up to 2,000 rows and 60 columns. It has no filter, sort or Go To Special, so for a long list use Excel. Nothing is uploaded, because the file is worked on your own device.
Choose your Excel or CSV file, press Edit, delete the odd empty row with Delete row, then press Done and Download. Free, no account, and the file stays on your device.
Clean up an Excel sheet on EditFlip →Questions
How do I delete all blank rows in Excel at once?
Add a helper column with =COUNTA across the row, filter for 0, and delete those rows. For a column that is always filled in, Ctrl+G, Special, Blanks and Delete Sheet Rows is quicker but riskier.
Why did Go To Special delete rows that had data?
Because Blanks selects every empty cell, and deleting rows removes the whole row of each one. A single empty cell in a row is enough. Undo with Ctrl+Z and use the helper column method.
Why won't Excel delete a row that looks empty?
It holds something you cannot see: a space, a non-breaking space, a formula that returns nothing or an apostrophe. Click the cell and check the formula bar.
Does removing blank rows change the order of my data?
Not with the filter or Go To Special methods. Sorting does move rows, so number them first and sort back by that number afterwards.
How do I delete blank rows in an Excel table?
Filter the table for the empty rows, select them, then right-click and choose Delete Table Rows. Clear the filter when you are done.
Can I undo deleting rows?
Yes, press Ctrl+Z straight away, before you do anything else. After you save and close the file, you cannot, so keep a copy of the original.
Can I remove blank rows on my phone?
You can delete rows one by one in the Excel app or on EditFlip with Delete row. For hundreds of gaps, use a computer.
