LearnExcel.io
Menu

How to Delete Blank Rows in Excel

Written by ··Updated June 16, 2026

The fastest way to delete blank rows in Excel is to select your data, press F5 → Special → Blanks, then right-click and choose Delete → Entire row. For larger datasets you can instead filter for blanks (or sort your data) to group the empty rows together, then delete them in one pass.

Microsoft Excel is a versatile software that can be used for many purposes, including data analysis, accounting, and budgeting. One common issue that users face is the existence of blank rows in their spreadsheets. These empty rows can disrupt the flow of data and make it difficult to work with a document, especially when dealing with a large dataset. In this tutorial, we will walk you through how to delete blank rows in Excel efficiently. Whether you are a beginner or an advanced user, this guide will help you save time and increase your proficiency in using Microsoft Excel.

Identify the Blank Rows in Excel

Before we can delete blank rows in Excel, we need to identify them first. There are different ways to do this, but one of the simplest methods is to sort the data by color. Here’s how to do it:

  1. Select the entire dataset that you want to sort, including the column headers.
  2. Click on the “Sort” button under the “Data” tab in the ribbon.
  3. In the “Sort” dialog box, choose the column that you want to sort by, and select “Cell Color” in the “Sort On” box.
  4. In the “Order” box, choose “On Top” or “On Bottom” for the color of the blank cells that you want to move.
  5. Click “OK” to sort your data.

Once you’ve sorted your data by color, you’ll be able to see the blank rows easily. You can also sort rows in Excel by value so that empty rows sink to the bottom of the range, where they are easy to select and delete in one block.

Delete the Blank Rows in Excel

After you’ve identified the blank rows in your Excel sheet, it’s time to delete them. Here are two methods for doing this:

Method 1: Using the Filter Function

  1. Select the column that contains the blank cells. If you need a refresher on turning filtering on, see how to create a filter in Excel.
  2. Click on the “Filter” button under the “Data” tab in the ribbon.
  3. In the drop-down menu, uncheck the box next to “Blanks” to show only the non-blank cells.
  4. Select the visible range of data, including the column headers.
  5. Right-click on the selection and choose “Delete” from the context menu.
  6. Choose “Entire row” and click “OK” to delete the blank rows.
  7. Turn off the filter by clicking on the “Filter” button again.

Method 2: Using the Go To Special Function

  1. Select the entire dataset that you want to delete blank rows from.
  2. Click on the “Find & Select” button under the “Home” tab in the ribbon.
  3. Choose “Go To Special” from the drop-down menu.
  4. In the “Go To Special” dialog box, select “Blanks” and click “OK”.
  5. Excel will select all the blank cells in your sheet.
  6. Right-click on the selection and choose “Delete” from the context menu.
  7. Choose “Entire row” and click “OK” to delete the blank rows.

Important caution: When you use Go To Special on the whole table, Excel selects every blank cell, and choosing “Entire row” will delete any row that contains any blank cell — not just rows that are completely empty. If some rows have data in one column but a gap in another, those rows will be removed too. To avoid this, select only a single column you know is filled in every real record (for example an ID or date column), run Go To Special → Blanks on just that column, and then delete the entire rows. That way only the truly empty rows are removed. The same principle applies when you delete empty rows in Excel or remove blank rows on a wide dataset.

Congratulations! you have successfully deleted the blank rows in Excel.

Method 3: Using Power Query (Remove Blank Rows)

If you import or refresh data regularly, Power Query can strip blank rows automatically every time the data reloads:

  1. Select any cell in your dataset, then on the “Data” tab click “From Table/Range” to load the data into Power Query.
  2. In the Power Query Editor, go to the “Home” tab.
  3. Click “Remove Rows” and choose “Remove Blank Rows.” Power Query deletes only the rows where every column is empty, so partially filled rows are kept.
  4. Click “Close & Load” to send the cleaned data back to your worksheet.

Because the steps are recorded, refreshing the query re-applies the blank-row removal — handy for recurring reports. Power Query also pairs well with broader cleanup steps when you clean data in Excel or work through a messy-data checklist.

Preventing Blank Rows in Excel

While it’s important to know how to delete blank rows in Excel, it’s even better if you can avoid creating them in the first place. Here are some tips for preventing blank rows:

  • Limit the number of blank rows between your headers and data.
  • Check your data entry for any unnecessary keystrokes or spaces.
  • Use data validation to prevent empty cells in certain columns.
  • Use the “CTRL + /” keyboard shortcut to select the entire dataset quickly.

Deleting blank rows in Excel may seem like a small task, but it can make a big difference in your productivity and workflow. It keeps your data organized, easy to read, and more efficient to work with. Now that you know how to delete blank rows in Excel, you can spend more time analyzing your data and less time cleaning it up.

FAQs

Here are some frequently asked questions related to deleting blank rows in Excel:

How do I delete multiple blank rows at once in Excel?

You can select multiple rows by holding down the “Ctrl” key on your keyboard while clicking on the row numbers that you want to delete. Once you’ve selected all the rows, you can right-click and choose “Delete” to remove all of them at once.

Can I delete blank rows in Excel without losing my formatting?

Yes, if you use the filter method to select the blank rows, you can delete them without affecting any of your formatting. The Go To Special method may remove formatting from the deleted rows, so be sure to review your sheet once you’ve deleted the rows to make sure everything looks correct.

How do I delete blank rows in a table in Excel?

To delete blank rows in a table, select the table, and check the box next to “Blanks” in the filter drop-down menu. Then right-click on the selection and choose “Delete” from the context menu. Choose “Table Rows” and click “OK” to delete the blank rows.

What if I accidentally delete a row that I need?

You can use the “Undo” button or the “Ctrl + Z” keyboard shortcut to undo your last action in Excel. If you’ve already saved your document, you can use the “Recover Unsaved Workbooks” feature in Excel to restore a previous version of your file.

Is it possible to automatically delete blank rows in Excel?

Yes, it is possible to use VBA (Visual Basic for Applications) to write a macro that can automatically delete blank rows in Excel. However, this is an advanced technique that requires some knowledge of programming. It’s recommended that you try the manual methods first before attempting this option.

Frequently Asked Questions

Why does Go To Special delete rows that aren’t actually empty?

Go To Special → Blanks selects every blank cell in your selection. If you then choose “Delete → Entire row,” Excel removes any row that has at least one blank cell, even if the rest of that row contains data. To delete only fully empty rows, run Go To Special on a single column that should always be filled (such as an ID column), or use the filter method on that column instead.

What is the keyboard shortcut to open Go To Special for blanks?

Press F5 (or Ctrl + G) to open the Go To dialog, click Special…, then choose Blanks and click OK. After the blank cells are selected, press Ctrl + minus (-) and choose “Entire row” to delete them quickly.

How do I delete only completely empty rows and keep rows with partial data?

Use the filter method or Power Query. With a filter, filter a key column for “Blanks” and delete only the rows that show up empty; with Power Query’s “Remove Blank Rows,” Excel deletes only rows where every column is empty. If you specifically need to remove empty rows without touching partially filled records, these two approaches are the safest.

What’s the difference between deleting blank rows and deleting blank cells?

Deleting blank rows removes entire rows from the sheet and shifts everything below upward. Deleting blank cells only clears or shifts individual cells, which can misalign your columns. If you only need to clear the gaps within a column, see how to delete empty cells in Excel rather than removing whole rows.

How do I count blank rows or cells before deleting them?

To check how many gaps you have, use the COUNTBLANK function. You can read more about counting empties with the COUNTBLANK function so you know what to expect before you start deleting.

Can I delete blank rows in a filtered or hidden range?

Be careful — deleting across filtered data can affect hidden rows differently than you expect. If you are working with filtered results, review how to delete filtered rows in Excel so you remove only the rows you intend to.

Related guides

View all Excel Basics and General Knowledge guides →