How to Remove Blank Lines in Excel Fast
By MagicTextTools Team · November 25, 2026
What Counts as a Blank Line
Learning how to remove blank lines in excel starts with knowing what Excel counts as blank. A row is truly blank when every cell in it is empty. A row that holds a space, a formula that returns an empty string such as ="", or a value in just one column is not truly blank, even though it looks empty on screen.
That difference decides which method works. Go To Special finds cells that are truly empty. It leaves a row alone when a cell holds a space or a formula result, even if that result shows nothing. A filter on one column is more forgiving, because you pick the column that decides whether a row is real.
Before you delete anything, copy your data to another sheet or workbook. Deleting rows is final once you close the file. You can undo with Ctrl+Z right after, but there is no way back after the file is closed and saved.
Method 1: Go To Special and Delete
This is the fastest way, and the one most people need. It finds every blank cell in a range at once and deletes those rows in one step.
- Select the column that decides whether a row is real, from the first data cell to the last. Do not select the whole sheet, and do not select every column, because a single blank cell in a full row would mark that row for deletion.
- Press Ctrl+G to open the Go To dialog, then click Special. You can also go to Home, then Find and Select, then Go To Special.
- Pick Blanks and click OK. Excel highlights every blank cell in your selection.
- Go to Home, then Delete, then Delete Sheet Rows. Excel deletes those rows and shifts the rows below up.
Check the result before you save. If a row you needed is gone, press Ctrl+Z at once. This method works in every version of Excel, and it handles dozens or hundreds of blank rows in one shot.
One warning is worth remembering. Go To Special selects blank cells, not whole empty rows. If you select a wide range, a row that has data in most columns but one blank cell can be deleted by mistake. Selecting a single key column, such as an ID or name column that every real row must have, avoids that risk.
Method 2: Filter a Required Column
Filtering is the safest general method, because you decide what makes a row real, and you can see the rows before you delete them.
- Click any cell inside your data.
- Go to Data, then click Filter in the Sort and Filter group. You can also press Ctrl+Shift+L.
- Open the filter arrow on a column that every real row must have, such as a name or ID column.
- Clear Select All, tick Blanks, and click OK. Only the rows that are blank in that column stay visible.
- Select the visible row numbers, right click, and choose Delete Row. Then clear the filter to bring the rest of the data back.
This method keeps rows that have a blank in some other column, because you only filter on the one column that matters. Use it when your data has optional fields, such as a phone number that some rows leave empty.
Method 3: Sort the Blanks Together
Sorting groups every blank row at the bottom, so you can review them as a block and delete them together. Add a helper column first, so you can put the rows back in their original order after.
- Add a column called Order next to your data and fill it with 1, 2, 3 down to the last row.
- Select your data, go to Data, then click Sort.
- Pick the column that decides whether a row is real, and sort it from A to Z. Blank values sort to the bottom.
- Check the block of blank rows at the bottom. Delete the rows that are truly empty.
- Sort by the Order column from smallest to largest to restore the original order, then delete the Order column.
Sorting is handy when you want to look at the blank rows before you delete them. The Order column is the safety net. Without it, you cannot get the original row order back after a sort.
Method 4: Power Query for Recurring Imports
Power Query suits files you clean again and again, like a weekly export. Set the steps once, and every refresh repeats them.
- Select your data and go to Data, then From Table/Range. Click OK to open the Power Query Editor.
- Go to Home, then Remove Rows, then Remove Blank Rows. Power Query checks the whole row and drops only rows where every value is empty or null.
- Click Close and Load to put the clean table back in your sheet.
When the source data changes, refresh the query and the same cleanup runs again. This is the best choice for reports you rebuild on a schedule. Microsoft documents this command in its Power Query filter guide, and it also offers a per column Remove Empty filter for rows that are blank in one key column only.
Method 5: A COUNTA Helper Column
A helper column flags fully blank rows so you can review them before you delete anything. It works in every version of Excel.
- In the first empty column next to your data, enter this formula in row 2 (change A2:F2 to cover your data columns):
=COUNTA(A2:F2)=0
- Fill the formula down to the last row.
- A fully blank row returns TRUE. Any row with even one value returns FALSE.
- Filter the helper column for TRUE, review those rows, and delete the ones that really are blank. Then delete the helper column.
This method is slower than Go To Special, but it shows you exactly which rows will go. Use it when a wrong delete would cost you, or when your rows have a mix of filled and empty cells.
Which Method Should You Pick
- Need it gone fast and the rows are fully empty: Go To Special.
- Need to see the rows first and keep rows with optional blanks: filter a required column.
- Need to review a block of blanks and restore the order after: sort with an Order column.
- Clean the same export every week: Power Query.
- Need to check each row by eye first: the COUNTA helper column.
If you remember one rule, make it this: decide what blank means first, then delete. A row that is blank in one column is not the same as a row that is blank everywhere.
Common Mistakes
Selecting the whole sheet for Go To Special. A blank cell in a full row marks that row for deletion. Select one key column instead.
Deleting without a copy. Deleting rows is final once the file is closed. Save a copy on another sheet first.
Treating spaces as blank. A cell that holds a space, or a formula that returns an empty string, is not truly blank. Go To Special leaves it alone. Use Find and Replace to clear spaces first, or use the COUNTA method to see what is really empty.
Forgetting the sort order. Sorting moves rows around. Add an Order column before you sort, or you cannot restore the original order.
Using Power Query on a one off file. Power Query is worth the setup for a file you clean every week. For a single cleanup, Go To Special or a filter is faster.
Frequently Asked Questions
Can I undo deleting blank rows?
Yes, press Ctrl+Z right after, or click Undo. Once you close the file, the deletion is final, so keep a copy of the original data.
Why are some blank rows still there after Go To Special?
The cells are probably not truly empty. A space, a formula that returns an empty string, or an apostrophe can sit in a cell that looks blank. Clear those cells first, then run the method again.
Does filtering delete the rows?
No. A filter only hides rows. You still have to select the visible blank rows and delete them, then clear the filter to see the rest.
Will sorting change my data?
Sorting changes the row order, not the values. Add an Order column with 1, 2, 3 before you sort, then sort by it after to restore the original order.
Can I keep the original data untouched?
Yes. Use Power Query, which loads a clean copy and leaves the source alone, or copy the data to a new sheet and clean the copy.
Faster Alternative: Clean Up Text Lists Online
If your list is plain text and not a spreadsheet, you do not need Excel at all. Our free online Remove Empty Lines tool deletes blank lines from pasted text in one click. Paste the list, and copy the clean result. There is no signup and nothing is sent to a server.