Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

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 clickgood idea3

Insert blank rows in every other row good idea3


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

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

If you want to delete blank rows across worksheets, you can apply Kutools for Excel's Remove Blank Rows utility.

Kutools for Excel: A handy Excel add-in tool,makes your jobs more easier and efficiency.
  • 300+ powerful and easy-to-used functions,110,000+ Excel users'choice
  • full-featured free trial in 60 days, no credit card required
  • dozens of one-click functions to shrink your working time on solving complex problems
  • includes functions to batch converion,deletion,combining sheets/cells,exproting, ect, free try now.

After installing Kutools for Excel, please do as below:(Free Download Kutools for Excel Now!)

1. Click Kutools > Delete > Delete Blank Rows, select the scale to delete blank rows from as you need.see screenshot:

doc remove blank rows 1

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.

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.


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


Insert blank rows in every other row

If you want to insert blank rows in every other row as below screenshot shown, the Insert Blank Rows &Columns utility can help you.

doc remove blank rows 2 doc arrow right doc remove blank rows 3

After installing Kutools for Excel, please do as below:(Free Download Kutools for Excel Now!)

1. Select the data range you want to insert blank rows every other row, click Kutools > Insert > Insert Blank Rows&Columns.
doc remove blank rows 4

2. In the Insert Blank Rows & Columns dialog, check Blank rows option, type 1 into Interval of and Rows textboxes.
doc remove blank rows 5

3. Click Ok. Now the blank rows have been inserted every other row.


Tabbed browsing & editing multiple Excel workbooks/Word documents as Firefox, Chrome, Internet Explore 10!

You may be familiar to view multiple webpages in Firefox/Chrome/IE, and switch between them by clicking corresponding tabs easily. Here, Office Tab supports similar processing, which allow you to browse multiple Excel workbooks or Word documents in one Excel window or Word window, and easily switch between them by clicking their tabs. Click for free 45-day trial of Office Tab!

ot excel


Recommended Productivity Tools

Office Tab

gold star1 Bring handy tabs to Excel and other Office software, just like Chrome, Firefox and new Internet Explorer.

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 300 New Features for Excel, Make Excel Much Easy and Powerful:

  • 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

Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    rs poshwal jaipur · 1 years ago
    VERY NICE, THANKS
  • To post as a guest, your comment is unpublished.
    YC · 1 years ago
    :lol: Good to share! Thank you!
  • To post as a guest, your comment is unpublished.
    Sudhakar · 1 years ago
    Very Helpful :-) it helped me to reconcile big report.
  • To post as a guest, your comment is unpublished.
    MEL · 1 years ago
    Guys I recently had this issue. I realised that the F5 special blanks wouldn't work because some of my columns had merged data sharing some rows...

    I just selected the columns needed and make sure the merge button was unselected. From there, the F5 special blanks select worked!
    Hope it helps someone.
  • To post as a guest, your comment is unpublished.
    Sanjay Rajput · 2 years ago
    This is simple VBA code to delete the entire rows based on particular column:-

    Sub DeleletBlankrows()
    Range("A1:A10000").SpecialCells(xlCellTypeBlanks).EntireRow.Delete
    End Sub