How to Delete Row If Cell Is Blank in Excel?

We have some rows with blank cells, and we’ll delete entire rows that have blanks.

Overview image of delete row row if cell is blank


Method 1 – Using the Go To Special Command

  • Select the whole dataset.
  • Go to the Home tab, choose Find & Select, and select Go To Special.

Open Go To Special dialog box

  • From the Go To Special dialog box, select Blanks.
  • Click OK.

Go TO Special dialog Box

  • The blank cells will be highlighted.
  • Select any of the blank cells and right-click on it.
  • Click on Delete.

  • The Delete dialog box will appear.
  • Select Entire row and click on OK.

All the rows that have blank cells will be deleted.

Final output


Method 2 – Using the Find and Replace Feature to Identify Rows and Delete Them

  • Select all the data.
  • Press Ctrl + F on your keyboard.

Find and Replace dialog box

  • Click on Options.
  • In the Find and Replace Dialog box:
    • Select Match entire cell contents.
    • Select Values from the Look in dropdown menu.
    • Click on Find All.

    working in find and replace dialog box

  • This will bring up the lists of all rows containing blank cells.
  • Press Ctrl + A to select all those rows.

select all the rows

  • It will highlight all those blank cells.
  • Right-click on a blank cell.
  • Click on Delete, then select Entire row and choose OK.

delete entire row

This will delete all those rows having blank cells.

output image


Method 3 – Filtering Rows with Blank Cells and Deleting Them

  • Create a Helper column.

creating helper column

  • Insert the following in the first cell of the column: =IF(COUNTBLANK(B7:E7),”Blank”,”Not Blank”)
  • Press Enter.
  • Drag down the Fill Handle.Insert formula
  • Go to the Data tab and Sort & Filter group, then choose Filter.

click on filter icon

  • Click on the drop-down of the Helper column.
  • Select Blank.

Filter rows with blank cells
You will see the rows that have blank cells.

Filtered rows

  • Select these rows and right-click on them.
  • Click Delete Row.

Delete rows with blanks

This will remove all the rows if any cell is blank in Excel.

  • Remove the filter.

Final output of filtering rows and delete

Read More: How to Delete Rows in Excel with Specific Text?


Method 4 – Using VBA

  • Go to the Developer tab.
  • Click on Visual Basic.

click on visual basic

  • Select Insert and choose Module.

Insert module

  • In the code editor, insert the following code:
    Sub RemoveRows()
    On Error Resume Next
    Range("B6:E15").SpecialCells(xlBlanks).EntireRow.Delete
    
    End Sub
  • Click on Run or you can press the F5 button.

All the rows containing blank cells will be deleted.

delete row using VBA


Download the Practice Workbook


Frequently Asked Questions

How do I remove blank cells from rows in Excel?

  1. Select the range where you want to delete rows.
  2. Go to the “Home” tab, click “Find & Select” in the editing group, then choose “Go To Special“.
  3. Select “Blanks” and click “OK”.
    This highlights all blank cells in the selected range.
  4. Right-click on one of the highlighted cells, choose “Delete”, then “Shift cells up“.

How do I remove blank cells from a column?

In the selected column, use “Go To Special” > “Blanks”, right-click on highlighted cells, and choose “Delete” > “Shift cells up” to remove blank cells and shift the remaining cells up.

Can I recover rows after I’ve deleted them in Excel?

Rows can be recovered immediately after deletion using the Undo function (Ctrl + Z). However, once the workbook is saved and closed, it’s not possible to recover the deleted rows without a previous backup.


Related Articles


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

Get FREE Advanced Excel Exercises with Solutions!
A.N.M. Mohaimen Shanto
A.N.M. Mohaimen Shanto

A.N.M. Mohaimen Shanto, a B.Sc. in Computer Science and Engineering from Daffodil International University, boasts two years of experience as a Project Manager at Exceldemy. He authored 90+ articles and led teams as a Team Leader, meticulously reviewing over a thousand articles. Currently, he focuses on enhancing article quality. His passion lies in Excel VBA, Data Science, and SEO, where he enjoys simplifying complex ideas to facilitate learning and growth. His journey mirrors Exceldemy's dedication to excellence and... Read Full Bio

2 Comments
  1. Great methods, thank you for publishing them!

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo