How to remove blank or empty rows in Excel?

If there are hundreds of blank rows scattering through the whole worksheets, you will be frustrated about it. This tutorial is giving instructions on how to remove all the blank rows step by step.

Remove all the blank rows with Go To Special command

Remove all the blank rows with VBA code

Remove all the blank rows with only one click

Recommended Productivity Software

Office Tab: Use tabbed interface in Office as the use of web browser Chrome, Firefox and Internet Explorer.
Kutools for Excel: Adds 120 powerful new features to Excel. Increase your productivity in 5 minutes. Save two hours every day!
Classic Menu for Office: Brings back your familiar menus to Office 2007, 2010 and 2013 (includes Office 365).

arrow blue right bubble Remove all the blank rows with Go To Special command

Hint


1. Select the range containing blank rows you want to remove.

2. Click Home > Find & Select > Go To Special.

doc-delete-blank-rows1

3. In the Go To Special dialog box, check the Blanks option.

doc-delete-blank-rows2

4. And then click OK, all of the entire blank rows are highlighted. Then click Home > Delete > Delete Sheet Rows, the blank rows have been deleted from the selected range. See screenshots:

doc-delete-blank-rows3
-1
doc-delete-blank-rows4


arrow blue right bubble Remove all the blank rows with VBA code

The following VBA code also can help you to delete the blank rows of the selected range. Please do as this:

1. Select the range that you want to remove the blank rows.

2. Click Developer > Visual Basic, a new Microsoft Visual Basic for applications window will be displayed, click Insert > Module, and input the following code into the Module:

VBA: Remove blank rows of the selected range.

Sub DeleteBlankRows()
'Update 20131107
Dim Rng As Range
Dim WorkRng As Range
On Error Resume Next
xTitleId = "KutoolsforExcel"
Set WorkRng = Application.Selection
Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8)
xRows = WorkRng.Rows.Count
Application.ScreenUpdating = False
For i = xRows To 1 Step -1
If Application.WorksheetFunction.CountA(WorkRng.Rows(i)) = 0 Then
WorkRng.Rows(i).EntireRow.Delete XlDeleteShiftDirection.xlShiftUp
End If
Next
Application.ScreenUpdating = True
End Sub

3. Then click doc-merge-multiple-workbooks-button button to run the code. And the entire blank rows in the selection will be removed.


arrow blue right bubble Remove all the blank rows with only one click

You can use the third party add-in Kutools for Excel to quickly merge multiple columns. What is Kutools for Excel?

Kutools for Excel: with more than 120 handy Excel add-ins, free to try with no limitation in 30days. Get it Now.

1. Click Kutools > Delete Tools > Delete Blank Rows, see screenshot:

doc-delete-blank-rows5

2. Then you can choose the scope to delete the blank rows. You can delete the blank rows in the selected range, in active sheet, in selected sheets and in all sheets of Excel. For more detail information about this utility, please visit here.

Tip: If there is a row which looks like a blank row but it contains invisible characters in its cells, this utility cannot delete such blank rows.


Is your problem solved?

Recommended Productivity Tools

The following tools will greatly save your time and effort, which one do you prefer?
Office Tab: Using handy tabs in your Office, as the way of Chrome, Firefox and New Internet Explorer.
Kutools for Excel: 120 powerful new functions for Excel, Increase your productivity in 5 minutes. Save two hours every day!
Classic Menu for Office: Bring back familiar menus to Office 2007, 2010, 2013 and 365, as if it were Office 2000 and 2003.

Kutools for Excel

gold star1 Amazing! Increase your productivity in 5 minutes. Don't need any special skills, save two hours every day!

gold star1 More than 120 powerful advanced functions which designed for Excel:

  • Merge Cell/Rows/Columns without Losing Data.
  • Combine and Consolidate Multiple Sheets and Workbooks.
  • Compare Ranges, Copy Multiple Ranges, Convert Text to Date, Unit and Currency Conversion.
  • Count by Colors, Paging Subtotals, Advanced Sort and Super Filter,
  • More Select/Insert/Delete/Text/Format/Link/Comment/Workbooks/Worksheets Tools...

Screen shot of Kutools for Excel

btn read more     btn download     btn purchase