Download the Excel remove blank rows practice workbook
Free Download

Get the Remove Blank Rows Practice Workbook

Want the file without building it from scratch? Download the ready-to-use workbook and follow along with every method in this tutorial.

  • Practice all 5 ways to remove blank rows in Excel
  • Test the safer COUNTA method on real data before deleting anything
  • Includes the VBA macro example for repetitive cleanup tasks

Enter your email below for instant access.

Get the Practice Workbook
Free. Instant access.

How to Delete Blank Rows Manually

When to Use:

This method is quick and effective for small datasets or when you only have a few blank rows to remove.

Here’s How:

  1. Select the Row: Click the number of the row you want to delete.
  2. Select Multiple Rows: If there are multiple blank rows next to each other, click and drag to select them all. If the blank rows are not next to each other, press and hold the Ctrl key while clicking the row numbers to select them individually.
  3. Remove Blank Rows: Right-click the selected row number(s) and choose “Delete” from the context menu.
Right-click menu with Delete highlighted after selecting a blank row

How to Filter and Delete Blank Rows

When to Use:

This method is great for large datasets with scattered blank rows.

❗Make sure that the blanks are always in the same column and ideally the entire row is blank. You must reset the filter and repeat the steps if the dataset changes.

Here’s How:

  • Select All Data: Click the top-left corner of your sheet to select all cells.
Selecting the entire dataset before applying a filter
  • Apply Filter: Go to the “Data” tab and click “Filter.”
Excel Data tab with Filter button highlighted
  • Filter Blank Rows: Click the filter arrow, uncheck “Select All,”. Then scroll down to the end of the list, and check the ‘Blanks’ option. Click on ‘OK’.
Filter dropdown showing Blanks checked to display empty rows
  • Select Blank Rows: Click the first blank row’s number, then press Ctrl + Shift + End to select the visible blank rows.
Filtered sheet showing only blank rows visible and selected
  • Delete Blank Rows: After selecting the blank rows, right-click on any of the selected row numbers and choose “Delete Row“.
Right-click menu with Delete Row highlighted
  • Click OK in the “Delete entire sheet row?” dialog box.
Excel prompt asking “Delete entire sheet row?” with OK button
  • Clear the Applied Filter: Go to the “Data” tab and press the “Clear” button to remove the filter.
Data tab with Clear highlighted to remove the applied filter

💡 For more tips on how to use Advanced Filter in Excel, check out this article.

How to Remove Blank Rows with Go To Special

When to Use:

This method is great for large datasets with scattered blank rows. But only use it when you’re sure that always the entire row is blank.

❗ Do not use this method if only some cells are blank, as shown in this example:

Example where only some cells are blank, not entire rows

You might accidentally delete the wrong rows. For such datasets, use Method 4 or Method 5 below.

Here’s How:

  • Open Find & Select: Go to the “Home” tab, click “Find & Select,” and choose “Go To Special…”
Find & Select menu with Go To Special highlighted
  • Select Blanks: Choose “Blanks” and click “OK.”
Go To Special dialog with Blanks selected
  • Remove Blank Rows: Go to the “Home” tab, click “Delete,” and choose “Delete Sheet Rows.”
Delete dropdown showing Delete Sheet Rows highlighted

This method also works for selecting blank cells when using COUNTIF to count blanks before deciding whether to delete them.

How to Find Blank Rows with a COUNTA Helper Column

When to Use:

Use this method when you have a large dataset and need to ensure that no data is mistakenly removed.

The COUNTA formula helps identify rows that are completely empty, making it a precise way to handle large amounts of data.

Here’s How:

  • Add a Helper Column: Add a new column at the end of your data.
  • Enter the Formula: In the first row of the new column, type ‘=COUNTA(‘ and then highlight the cells in that row you want to count. Finish the formula with a ‘)‘. For example, for our data the formula looks like this:
=COUNTA(A2:D2)
COUNTA formula in helper column showing number of filled cells
  • Copy the Formula Down: Click the cell with your formula (e.g., E2). Press Ctrl+C to copy it. Next, scroll down to the end of your dataset. Hold Shift and click the last cell in the helper column you want to select. Then press Ctrl+V to paste the formula across the full range of cells.
  • Select All Data: Click the top-left corner of your sheet to select all cells. Then go to the “Data” tab and click “Filter.”
  • Filter Zero Values: Apply a filter to the helper column. Click the filter arrow, uncheck ‘Select All’, and then check the option to filter rows with a value of ‘0‘.
Filtering helper column to show only rows with value 0
  • Delete Empty Rows: Select the rows with a value of 0, right-click, and choose “Delete Row.”
Deleting the filtered blank rows after selecting them
  • Clear the Applied Filter: Go to the “Data” tab and press the “Clear” button to remove the filter.
Data tab with Clear highlighted after deleting blank rows

How to Remove Blank Rows with Power Query

If you need to remove blank rows regularly (e.g., from recurring data imports), Power Query is the best option.

It remembers the transformation and reapplies it automatically when data refreshes.

  1. Select your data and go to Data > From Table/Range
  2. In the Power Query Editor, select the Home tab
  3. Click Remove Rows > Remove Blank Rows
  4. Click Close & Load

Every time you refresh the query (Data > Refresh All), Power Query removes blanks again without manual steps.

Want to learn Power Query from scratch? See our Power Query beginner-to-pro course.

How to Remove Blank Rows with a VBA Macro

When to Use:

Use this method for large datasets or repetitive tasks. This method automates the process, saving time and reducing errors.

Here’s How:

The macro deletes a line only if the entire row is empty. It uses the COUNTA function, which counts the number of non-empty cells in each row.

If the count is zero, meaning the row is completely blank, the macro deletes that row. This loop runs from the bottom of the used range to the top to avoid issues with shifting rows.

  • Open VBA Editor: Press Alt + F11.
  • Insert a New Module: In the VBA editor, go to the menu and select Insert > Module. This will create a new module where you can write your code.
VBA Editor Insert menu with Module selected
  • Add the VBA Code: Copy and paste the following code into the module window:
Sub RemoveBlankRows_XelPlus()
    Dim Rng As Range
    Dim i As Long
    Set Rng = ActiveSheet.UsedRange
    For i = Rng.Rows.Count To 1 Step -1
        If Application.WorksheetFunction.CountA(Rng.Rows(i)) = 0 Then
            Rng.Rows(i).EntireRow.Delete
        End If
    Next i
End Sub
VBA module showing macro code to delete fully blank rows
  • Close the VBA Editor: After pasting the code, close the VBA editor by clicking the X in the top right corner or pressing Alt + Q.
  • Run the Macro: Back in your Excel workbook, press Alt + F8 to open the Macro dialog box. Select ‘RemoveBlankRows_XelPlus’ from the list of macros and click ‘Run

Once your blank rows are removed, consider hiding rows you don’t need instead of deleting them, or protecting cells to prevent accidental data loss.

Download the Free Practice File

Enhance your learning experience by downloading our workbook. Practice the techniques discussed in real-time and master to delete empty rows in Excel with hands-on examples.

Download the workbook here and start applying what you’ve learned directly in Excel.

(empty alt)

Featured Bundle

Black Belt Excel Bundle

This Excel Black Belt Package includes EIGHT of our Popular Courses. You’ll learn high-value, in-depth Excel skills that solve real problems.
Learn More
Excel Black Belt Bundle XelPlus

Leila Gharani

Founder of XelPlus and ten-time Microsoft MVP. Leila helps over 500,000 professionals master Excel, Power BI, and data automation through practical, real-world training.