How to Delete Empty Rows at the Bottom in Excel?

Our dataset contains empty rows, and we’ll remove these empty rows in various ways.

Delete Empty Rows at Bottom


Method 1 – Manual Approach to Delete Empty Rows in Excel

Steps:

  • Press Ctrl and select the entire blank rows by clicking the row headers or dragging through the cells.

  • Right-click on the selection and choose Delete or press Ctrl + – (minus). A dialog box will pop up.

Delete Empty Rows at Bottom manually

  • Select Entire Row and click OK.


Method 2 – Deleting Excel Empty Rows at the Bottom by Hiding

Steps:

  • Select a cell at the bottom of your dataset.

Delete Empty Rows at Bottom by hiding

  • Press Ctrl + Shift + Down Arrow + Right Arrow. This will select all the cells after it.

Delete Empty Rows at Bottom hide

  • Press Ctrl + 9 and Excel will hide all the rows at the bottom.


Method 3 – Using the Excel Sort Command to Delete Empty Rows at the Bottom

Steps:

  • Select the entire data range you want to sort, go to the Data tab, and select either the Ascending or Descending sorting option.

Delete Empty Rows at Bottom by sort

All the data is sorted, leaving the empty rows at the bottom.

Delete Empty Rows at Bottom sorting

Read More: How to Delete Blank Rows in Excel?


Method 4 – Deleting Empty Rows in Excel Using the Go to Special Tool

Steps:

  • Select the entire data range and press Ctrl + G.

  • From the dialog box, select Special.
  • Select Blanks and click OK as shown in the image below.

Delete Empty Rows at Bottom go to special

Here’s the result. All empty rows will be selected.

Read More: How to Delete Row If Cell Is Blank in Excel?


Method 5 – Applying the Filter Tool to Delete Empty Rows at the Bottom

Steps:

  • Select the entire data range with headers, then go to the Data tab and select Filter as shown in the image.

Delete Empty Rows at Bottom by filter

  • Click on the drop-down button and select Blanks.

Delete Empty Rows at Bottom by filter Data Command

  • After clicking OK, our data table will look like the following image.

  • Select the blank rows and delete them as in Method 1.

Related Content: How to Delete Rows in Excel with Specific Text


Method 6 – Deleting Empty Rows with the Find Tool

Steps:

  • Select the entire data range and press Ctrl + F.
  • A dialog box will pop up. Select Options as shown in the screenshot below.

Delete Empty Rows at Bottom using Find

  • Leave the Find What empty, select Look in as Values, and tick Match entire cell contents.
  • Click Find All.

  • All the blank cells will be visible with their location.
  • Press Ctrl + A and close the dialog box.

Delete Empty Rows at Bottom by find option

We will get the result as follows.

Related Content: How to Delete Row If Cell Contains Specific Values in Excel?


Method 7 – Using VBA Macro to Delete Empty Rows

Steps:

  • Right-click on the sheet name and go to View Code.

Delete Empty Rows at Bottom vba

  • Copy and paste the VBA code below into the window.

VBA code:

Sub DeleteEmpty()
  Dim Myrange As Range, rows As Long, i As Long
  Set Myrange = ActiveSheet.Range("B4:Z100")
  rows = Myrange.rows.Count
  For i = rows To 1 Step (-1)
    If WorksheetFunction.CountA(Myrange.rows(i)) = 0 Then Myrange.rows(i).Delete
  Next
End Sub

  • Press the F5 or the Play button to run the code.

Delete Empty Rows at Bottom using VBA


Download the Practice Workbook


Related Articles


<< Go Back to Delete Rows | Rows in Excel | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Mahbubur Rahman
Mahbubur Rahman

MAHBUBUR RAHMAN is a leather engineer with a talent for Excel and a passion for VBA programming. To him, programming is like a time-saving wizard, making data manipulation, file handling, and internet interactions a breeze. His skill set extends to SPSS, STATA, Deep Neural Networks, and Machine Learning. Holding a B.Sc in Leather Engineering from Khulna University of Engineering & Technology, he's shifted to become a content developer. In this role, he crafts technical content centred around Excel... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo