Software & OS

How to Remove Blank Rows in Excel (3 Safe Methods)

To remove blank rows in Excel, filter a column that every real record fills, show only its (Blanks), select those visible rows and delete them. The faster Go To Special method (Ctrl+G, Special, Blanks) also works, but it deletes any row with even one empty cell, so use it with care.

Make a copy of the sheet first (right-click the sheet tab, then Move or Copy, then tick Create a copy). Deleted rows come back with Ctrl+Z only until you save or close the file.

Which method should you use?

SituationMethod
One column is always filled in real records (ID, name, date)Filter that column for blanks, delete visible rows
Rows are either completely empty or completely filledGo To Special > Blanks
A row is empty only if all of several columns are emptyHelper column with COUNTA, then filter
Rows look empty but nothing matchesCheck for spaces and empty-text formulas (last section)

Method 1: filter a key column and delete the blank rows

This is the safest method because you choose exactly which column decides whether a row is blank.

  1. Click any cell in your data and press Ctrl+Shift+L to turn on filtering (or use Data > Filter).
  2. Open the drop-down arrow on the key column, for example the ID column.
  3. Untick (Select All), then tick (Blanks) and click OK. Microsoft's filter documentation describes the same steps, and notes that the (Blanks) entry appears only if the column contains at least one blank cell.
  4. Excel now shows only the rows where that column is empty. Check that each visible row really is empty across the whole row.
  5. Select the row numbers of the visible rows (click the first number, then Shift+click the last one). Right-click the selection and choose Delete Row, or use Home > Delete > Delete Sheet Rows.
  6. Clear the filter (Data > Clear). The blank rows are gone and the rest of the data has shifted up.

Do not select the header row in step 5, and do not delete rows while a filter is active on a column that hides real data. If you are unsure, clear the filter after step 5 and scroll through the data before you save. Microsoft's filter page does not cover deleting filtered rows, so verify the result this way rather than trusting it.

Method 2: Go To Special > Blanks

This method selects empty cells directly. It is quick on a clean list where every blank cell belongs to a blank row.

  1. Select the range that contains your data, only the data and not whole columns. For example, click A2 and then Ctrl+Shift+End to reach the last used cell.
  2. Press Ctrl+G, then click Special. The same dialog opens from Home > Find & Select > Go To Special.
  3. Choose Blanks and click OK. Every empty cell in the range is now selected.
  4. Go to Home > Delete > Delete Sheet Rows.

Excel deletes the whole row for each selected cell, and the remaining rows shift up. The problem is the word "each". If row 14 has a name and an email but an empty phone cell, the phone cell is selected, so row 14 is deleted with the genuinely empty rows. Several forum threads describe exactly this surprise. The fix is to run this method on a single key column only: select just that column's data range before step 2, so only that column's blanks decide which rows go.

If you pick Home > Delete > Delete Cells instead and choose Shift cells up, Excel moves only the cells in that column upward and leaves the other columns where they were. That misaligns your records, so avoid it on tables with more than one column.

Method 3: a helper column when "blank" means several columns

Sometimes a row counts as blank only when columns A to D are all empty. A helper column handles that case without any macro.

  1. In an empty column next to your data, for example E2, enter:
    =COUNTA(A2:D2)
  2. Fill the formula down to the last row of data.
  3. Filter column E for the value 0. Those are the rows where all four cells are empty.
  4. Select the visible rows, delete them as in Method 1, then clear the filter and delete the helper column.

COUNTA counts every cell that holds something, including text, numbers and errors. Microsoft's documentation also says that it counts a formula that returns an empty string, and that it does not count truly empty cells. So a row with a space in one cell gives a count of 1, not 0. That is useful to know in the next section.

Example output of the helper column for four rows (example only):

Row   A       B             C     D     E (COUNTA)
2     1001    Ana           NY    yes   4
3                                       0
4     1003                  LA          2
5                                       0

Filtering E for 0 shows rows 3 and 5 only, and row 4 survives even though two of its cells are empty.

Rows that look empty but won't delete

If Go To Special selects nothing, or the filter shows no (Blanks) entry, the cells are probably not empty. Common causes:

  • A space or non-printing character. Data pasted from web pages or exports often has one. Test a cell with =LEN(A3): a result above 0 means the cell holds something.
  • A formula that returns empty text. A formula such as =IF(B3="","",B3) looks empty but counts as content. For ways to test this kind of cell, see Excel IF not blank formulas.
  • Hidden rows. A deletion you expected may be skipped or behave differently if rows are hidden. Check first with how to see hidden rows in Excel.
  • Formatting only. A cell with a fill colour or border but no value is empty to Go To Special, yet it still extends the used range, so the scroll bar stays long.

To clear spaces, select the column, press Ctrl+H, type a single space in Find what, leave Replace with empty, and click Replace All. Only do this on columns where spaces are never meaningful.

If the sheet is still huge after deleting

Deleting rows removes them from the data, but Excel may still treat old formatted rows as used. Press Ctrl+End to see where Excel thinks the data ends. If it lands far below your last record, select the empty rows below your data, right-click the row numbers and choose Delete, then save the file. Excel's limit is 1,048,576 rows per sheet, so a Ctrl+End position near that number almost always means leftover formatting rather than data.

Frequently asked questions

What is the fastest way to remove blank rows in Excel?
Select the data, press Ctrl+G, click Special, choose Blanks and OK, then use Home > Delete > Delete Sheet Rows. It is fast, but it deletes every row that contains any selected blank cell, so use it only when a blank cell always means the whole row is empty. Otherwise filter on a column that every real record fills.
Why did Excel delete rows that still had data?
Go To Special > Blanks selects every empty cell in the selected range, not only fully empty rows. Deleting the rows of those cells removes any row that had a single empty cell, such as a missing phone number. Undo with Ctrl+Z and use the filter or helper column method instead.
Can I undo deleting blank rows in Excel?
Yes, press Ctrl+Z right after deleting. Once you save, close the file or run a macro, undo is no longer available, so work on a copy of the sheet if the data matters.
Why does a row that looks empty not count as blank?
The cell may hold a space, an apostrophe, or a formula that returns empty text (""). Excel treats these as content, so Go To Special > Blanks skips them and the COUNTA function counts them. Clean them first, or test the row with a formula that counts only non-empty text.

Sources