How to Delete Blank Rows in Excel

This post will guide you how to delete blank or empty rows or rows that contain blank cells in excel. If you want to remove blank rows that contain blank cells, you can use the Go To Special command. But if you just want to remove rows that are entirely blank, you should use the Filter blanks cell way.You can also check out this tutorial if you need to insert multiple blank rows.

1. Delete Blank Rows Manually

To delete a blank row in Excel, and the first method of deleting blank rows must be the manual way. Let’ s see the below steps:

Step1: you need to locate the blank rows you want to remove firstly. These are the rows with no data that disrupt the flow of information.

Step2: click row number to select the blank rows you want to delete. or you can press Shift + Space shortcut to select the entire blank row.

How to Delete Blank Rows in Excel 10.png

Step3: hold Ctrl key and continue clicking on the row numbers of the other blank rows you want to delete. This will select multiple rows at once.

How to Delete Blank Rows in Excel 11.png

Step4: you can go to Home tab, click on the Delete command, then choose Delete Sheet Rows menu.

How to Delete Blank Rows in Excel 12.png

Or you can also right click on the selected blank rows, choose Delete menu from the drop-down menu list.

How to Delete Blank Rows in Excel 13.png

If you only have a couple blank rows, and you use this method to delete blank rows quickly. And if you have lots of blank rows in your worksheet, and you can use the following methods in this tutorial.

2. Delete rows that contain blank cells Using Go To Special

You can use the Go To Special command to remove all rows that contain blank cells, just do the following:

Step1: on the HOME tab, click Find & Select command under Editing group

Step2: click Go To Special

delete blank rows1

Step3: Select Blanks radio button and then click OK button.

delete blank rows2

Step4: you will see that all rows that contain blank cells are selected.

delete blank rows3

Step5: go to HOME tab, click Delete command under Cells group. Then click Delete Sheet Rows from the drop down menu list.

delete blank rows4
delete blank rows5

3. Delete Blank Rows Using Find Command

You can also select all blank rows using the Find command in Excel. Then you can delete those selected blank rows.

Step1: open your worksheet where you want to delete the blank rows.

Step2:  press Ctrl +F shortcut to open the Find and Replace dialog box. Or go to Home tab, click on Find & Select command under Editing group. clicking Find menu from the drop down menu list.

How to Delete Blank Rows in Excel 14.png

Step3: click on the Option button firstly, it will expand the options if there are not visible.

How to Delete Blank Rows in Excel 15.png

Step4: leave the Find what text box as blank, enable Match entire cell contents option, choose Sheet option in the Within drop down list, ensure that the Search field is set to By Rows, and choose Values option in the Look in drop down list. 

How to Delete Blank Rows in Excel 16.png

Step5: Press Find All button. All the blank cells would be listed.

How to Delete Blank Rows in Excel 17.png

Step6: press Ctrl +A shortcut to select all the cells in the list. click Close button to close the Find and Replace dialog box.

How to Delete Blank Rows in Excel 18.png

Step7: right click on any of the selected blank cells and choose Delete menu to delete all the blank rows.

How to Delete Blank Rows in Excel 19.png

4. Delete Blank Rows with Filter Feature

If you want to remove blank rows in excel, and you need to find the entire blank rows firstly, so you can use the Filter function to filter all blank rows, just do this following:

Step1: select the range of cells that you want to remove blank rows

delete blank rows6

Step2: on the DATA tab, click Filter command under Sort& Filter group.

delete blank rows7

Step3: click Filter arrow button and uncheck the Select All box, just check only Blanks, then all blank rows in that column will be filtered.

delete blank rows8
delete blank rows9

Step4: you need to continue to filter other columns for blank cells until all cells in the selected range are blank.

delete blank rows10

Step5: select all the filtered rows, go to HOME tab, click Delete command under Cells group. Then click Delete Sheet Rows from the drop down menu list.

delete blank rows11

Or just right-click on the selected cell and then click Delete Row from the drop-down menu list.

delete blank rows12
delete blank rows13

Step6: on the DATA tab, click Clear command under Sort & Filter group.

delete blank rows14

Step7: you will see that all blank rows are removed.

delete blank rows15

5. Delete Blank Rows with Advanced Filters

There is another Filter option to help use delete all rows in Excel. And you can use the Advanced Filters option to copy your data to another location without any blank rows.

Step1: open your worksheet where you want to delete the blank rows.

Step2:  you need to setup a filter criteria range based on one column heading in your original data, such as, Cell A1.  You need to use the below two formulas as criteria range.

=A1
=""

Enter the first formula into Cell G1, and type the second formula into Cell G2.

How to Delete Blank Rows in Excel 20.png

Step3: go to Data tab, click on Advanced command under Sort & Filter group.

How to Delete Blank Rows in Excel 21.png

Step4: enable copy to another location option, select your original data($A$1:$C$7) as List range, select G1:G2 as your criteria range, and then select one blank cell to place the filtered data.

How to Delete Blank Rows in Excel 22.png

Step5: press Ok button. You would see that all the data without any blank rows have been copied to another location.

How to Delete Blank Rows in Excel 23.png

6. Delete Blank Rows Using Sorting Command

You can also use Sort command to sort your original data so that you can ignore or delete all blank rows.

Step1: open your worksheet where you want to delete the blank rows.

Step2:  select your original data that contain blank rows(A1:C7).

How to Delete Blank Rows in Excel 23-1.png

Step3: go to Data tab, click on Sort A to Z command under Sort & Filter group.  both the ascending or descending order can work well.

How to Delete Blank Rows in Excel 24.png

Step4: Now you would see that all the blank rows were moved to the bottom of your original data, and just ignore them.

How to Delete Blank Rows in Excel 25.png

Note: To keep the original sort order of your data, you can add the index number in a helper column next to your data before Step3.  Type number 1 in Cell D1, and drag the Fill Handler down to cell D7 to fill series.  Run the step3 to sort your data. then you can sort the filter data to restore the original order based on the helper column.

How to Delete Blank Rows in Excel 26.png

7. Delete Blank Rows Using Power Query

Power Query Editor is a powerful tool to help you quickly removing blank rows in Excel.  As It has an  built-in feature to remove blank rows for your table or range.

Step1:  select your range of cells that contain blank rows, such as, A1:C7.

Step2: right click on it, and select Get Data from Table/Range menu from drop down menu list.

How to Delete Blank Rows in Excel 27.png

Step3: click Ok button in the Create Table window.

How to Delete Blank Rows in Excel 28.png

Step4: the Power Query Editor will open.  Go to Home tab, and press the Remove Rows button, select the Remove Blank Rows menu.

How to Delete Blank Rows in Excel 29.png

Step5: you can see that all the blank rows should be removed immediately in the Power Query Editor.

How to Delete Blank Rows in Excel 30.png

Step6: click Close & Load button, it will back to your current worksheet.

How to Delete Blank Rows in Excel 30.png

8. Delete blank rows in Excel VBA

You can also write an excel Macro to delete blank rows in excel, just refer to the following steps:

1# click on “Visual Basic” command under DEVELOPER Tab.

Get the position of the nth using excel vba1

2# then the “Visual Basic Editor” window will appear.

3# click “Insert” ->”Module” to create a new module

convert column number to letter3

4# paste the below VBA code into the code window. Then clicking “Save” button.

remove blank rows111
Sub RemoveBlankRows()
    Set myRange = Application.Selection
    Set myRange = Application.InputBox("Select one Range that you want to remove blank rows", "RemoveBlankRows", myRange.Address, Type:=8)
    xRows = myRange.Rows.Count
    For i = xRows To 1 Step -1
        If Application.WorksheetFunction.CountA(myRange.Rows(i)) = 0 Then
            myRange.Rows(i).EntireRow.Delete XlDeleteShiftDirection.xlShiftUp
        End If
    Next
End Sub

5# back to the current worksheet, then run the above excel macro.

delete blank rows17
delete blank rows18

9: Video: Delete Blank Rows

This video will show you eight defferent methods to delete all the blank rows in Excel 2013/2016/2019/365.

Leave a Reply